Skip to content

Commit fea5889

Browse files
authored
Merge branch 'main' into renovate/node-16.x
2 parents e4ec676 + 7bb35af commit fea5889

File tree

92 files changed

+1422
-847
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

92 files changed

+1422
-847
lines changed

.github/CODEOWNERS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
* @coder/code-server-reviewers
22

33
ci/helm-chart/ @Matthew-Beckett @alexgorbatchev
4+
5+
docs/install.md @GNUxeava

.github/workflows/ci.yaml

Lines changed: 115 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
node-version: "16"
4040

4141
- name: Install helm
42-
uses: azure/setup-helm@v2.1
42+
uses: azure/setup-helm@v3.3
4343

4444
- name: Fetch dependencies from cache
4545
id: cache-yarn
@@ -143,14 +143,20 @@ jobs:
143143
id: vscode-rev
144144
run: echo "::set-output name=rev::$(git rev-parse HEAD:./lib/vscode)"
145145

146-
# We need to rebuild when we have a new version of Code or when any of
147-
# the patches changed. Use VSCODE_CACHE_VERSION to force a rebuild.
146+
- name: Get version
147+
id: version
148+
run: echo "::set-output name=version::$(jq -r .version package.json)"
149+
150+
# We need to rebuild when we have a new version of Code, when any of
151+
# the patches changed, or when the code-server version changes (since
152+
# it gets embedded into the code). Use VSCODE_CACHE_VERSION to
153+
# force a rebuild.
148154
- name: Fetch prebuilt Code package from cache
149155
id: cache-vscode
150156
uses: actions/cache@v3
151157
with:
152158
path: lib/vscode-reh-web-*
153-
key: vscode-reh-package-${{ secrets.VSCODE_CACHE_VERSION }}-${{ steps.vscode-rev.outputs.rev }}-${{ hashFiles('patches/*.diff') }}
159+
key: vscode-reh-package-${{ secrets.VSCODE_CACHE_VERSION }}-${{ steps.vscode-rev.outputs.rev }}-${{ steps.version.outputs.version }}-${{ hashFiles('patches/*.diff', 'ci/build/build-vscode.sh') }}
154160

155161
- name: Build vscode
156162
if: steps.cache-vscode.outputs.cache-hit != 'true'
@@ -164,7 +170,9 @@ jobs:
164170
if: success()
165171

166172
- name: Upload coverage report to Codecov
167-
run: yarn coverage
173+
uses: codecov/codecov-action@v3
174+
with:
175+
token: ${{ secrets.CODECOV_TOKEN }}
168176
if: success()
169177

170178
# The release package does not contain any native modules
@@ -190,9 +198,9 @@ jobs:
190198
# This environment "npm" requires someone from
191199
# coder/code-server-reviewers to approve the PR before this job runs.
192200
environment: npm
193-
# Only run if PR comes from base repo
201+
# Only run if PR comes from base repo or on merge request
194202
# Reason: forks cannot access secrets and this will always fail
195-
if: github.event.pull_request.head.repo.full_name == github.repository
203+
if: github.event.pull_request.head.repo.full_name == github.repository || github.event.pull_request.merged == true
196204
runs-on: ubuntu-latest
197205
steps:
198206
- name: Checkout repo
@@ -288,8 +296,11 @@ jobs:
288296
- name: Build standalone release
289297
run: source scl_source enable devtoolset-9 && yarn release:standalone
290298

291-
- name: Sanity test standalone release
292-
run: yarn test:standalone-release
299+
- name: Install test dependencies
300+
run: SKIP_SUBMODULE_DEPS=1 yarn install
301+
302+
- name: Run integration tests on standalone release
303+
run: yarn test:integration
293304

294305
- name: Build packages with nfpm
295306
run: yarn package
@@ -421,8 +432,11 @@ jobs:
421432
- name: Build standalone release
422433
run: yarn release:standalone
423434

424-
- name: Sanity test standalone release
425-
run: yarn test:standalone-release
435+
- name: Install test dependencies
436+
run: SKIP_SUBMODULE_DEPS=1 yarn install
437+
438+
- name: Run integration tests on standalone release
439+
run: yarn test:integration
426440

427441
- name: Build packages with nfpm
428442
run: yarn package
@@ -447,7 +461,6 @@ jobs:
447461
uses: actions/checkout@v3
448462
with:
449463
fetch-depth: 0
450-
submodules: true
451464

452465
- name: Install Node.js v16
453466
uses: actions/setup-node@v3
@@ -477,15 +490,15 @@ jobs:
477490
478491
- name: Install dependencies
479492
if: steps.cache-yarn.outputs.cache-hit != 'true'
480-
run: yarn --frozen-lockfile
493+
run: SKIP_SUBMODULE_DEPS=1 yarn --frozen-lockfile
481494

482495
- name: Install Playwright OS dependencies
483496
run: |
484497
./test/node_modules/.bin/playwright install-deps
485498
./test/node_modules/.bin/playwright install
486499
487500
- name: Run end-to-end tests
488-
run: yarn test:e2e
501+
run: yarn test:e2e --global-timeout 840000
489502

490503
- name: Upload test artifacts
491504
if: always()
@@ -497,6 +510,93 @@ jobs:
497510
- name: Remove release packages and test artifacts
498511
run: rm -rf ./release-packages ./test/test-results
499512

513+
test-e2e-proxy:
514+
name: End-to-end tests behind proxy
515+
needs: package-linux-amd64
516+
runs-on: ubuntu-latest
517+
timeout-minutes: 25
518+
env:
519+
# Since we build code-server we might as well run tests from the release
520+
# since VS Code will load faster due to the bundling.
521+
CODE_SERVER_TEST_ENTRY: "./release-packages/code-server-linux-amd64"
522+
steps:
523+
- name: Checkout repo
524+
uses: actions/checkout@v3
525+
with:
526+
fetch-depth: 0
527+
528+
- name: Install Node.js v16
529+
uses: actions/setup-node@v3
530+
with:
531+
node-version: "16"
532+
533+
- name: Fetch dependencies from cache
534+
id: cache-yarn
535+
uses: actions/cache@v3
536+
with:
537+
path: "**/node_modules"
538+
key: yarn-build-${{ hashFiles('**/yarn.lock') }}
539+
restore-keys: |
540+
yarn-build-
541+
542+
- name: Download release packages
543+
uses: actions/download-artifact@v3
544+
with:
545+
name: release-packages
546+
path: ./release-packages
547+
548+
- name: Untar code-server release
549+
run: |
550+
cd release-packages
551+
tar -xzf code-server*-linux-amd64.tar.gz
552+
mv code-server*-linux-amd64 code-server-linux-amd64
553+
554+
- name: Install dependencies
555+
if: steps.cache-yarn.outputs.cache-hit != 'true'
556+
run: SKIP_SUBMODULE_DEPS=1 yarn --frozen-lockfile
557+
558+
- name: Install Playwright OS dependencies
559+
run: |
560+
./test/node_modules/.bin/playwright install-deps
561+
./test/node_modules/.bin/playwright install
562+
563+
- name: Cache Caddy
564+
uses: actions/cache@v2
565+
id: caddy-cache
566+
with:
567+
path: |
568+
~/.cache/caddy
569+
key: cache-caddy-2.5.2
570+
571+
- name: Install Caddy
572+
env:
573+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
574+
if: steps.caddy-cache.outputs.cache-hit != 'true'
575+
run: |
576+
gh release download v2.5.2 --repo caddyserver/caddy --pattern "caddy_2.5.2_linux_amd64.tar.gz"
577+
mkdir -p ~/.cache/caddy
578+
tar -xzf caddy_2.5.2_linux_amd64.tar.gz --directory ~/.cache/caddy
579+
580+
- name: Start Caddy
581+
run: sudo ~/.cache/caddy/caddy start --config ./ci/Caddyfile
582+
583+
- name: Run end-to-end tests
584+
run: yarn test:e2e:proxy
585+
586+
- name: Stop Caddy
587+
if: always()
588+
run: sudo ~/.cache/caddy/caddy stop --config ./ci/Caddyfile
589+
590+
- name: Upload test artifacts
591+
if: always()
592+
uses: actions/upload-artifact@v3
593+
with:
594+
name: failed-test-videos-proxy
595+
path: ./test/test-results
596+
597+
- name: Remove release packages and test artifacts
598+
run: rm -rf ./release-packages ./test/test-results
599+
500600
trivy-scan-repo:
501601
permissions:
502602
contents: read # for actions/checkout to fetch code
@@ -509,7 +609,7 @@ jobs:
509609
fetch-depth: 0
510610

511611
- name: Run Trivy vulnerability scanner in repo mode
512-
uses: aquasecurity/trivy-action@e27605859b9550f81ddd818eb816c8cb83cf9650
612+
uses: aquasecurity/trivy-action@cb606dfdb0d2b3698ace62192088ef4f5360b24f
513613
with:
514614
scan-type: "fs"
515615
scan-ref: "."

.github/workflows/docker.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,11 @@ jobs:
4747
run: echo "::set-output name=version::$(jq -r .version package.json)"
4848

4949
- name: Download release artifacts
50-
uses: robinraju/release-downloader@v1.3
50+
uses: robinraju/release-downloader@v1.4
5151
with:
5252
repository: "coder/code-server"
5353
tag: v${{ steps.version.outputs.version }}
54-
fileName: "*"
54+
fileName: "*.deb"
5555
out-file-path: "release-packages"
5656

5757
- name: Publish to Docker

.github/workflows/docs-preview.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ on:
44
pull_request:
55
branches:
66
- main
7+
paths:
8+
- "docs/**"
79

810
permissions:
911
actions: none

.github/workflows/installer.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,12 @@ jobs:
3434
run: ./install.sh
3535

3636
- name: Test code-server
37-
run: yarn test:standalone-release code-server
37+
run: CODE_SERVER_PATH="code-server" yarn test:integration
3838

3939
alpine:
4040
name: Test installer on Alpine
4141
runs-on: ubuntu-latest
42-
container: "alpine:3.14"
42+
container: "alpine:3.16"
4343
steps:
4444
- name: Checkout repo
4545
uses: actions/checkout@v3
@@ -66,4 +66,4 @@ jobs:
6666
run: ./install.sh
6767

6868
- name: Test code-server
69-
run: yarn test:standalone-release code-server
69+
run: CODE_SERVER_PATH="code-server" yarn test:integration

.github/workflows/npm-brew.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
uses: dawidd6/action-download-artifact@v2
3232
id: download
3333
with:
34-
branch: v${{ steps.version.outputs.version }}
34+
branch: release/v${{ steps.version.outputs.version }}
3535
workflow: ci.yaml
3636
workflow_conclusion: completed
3737
name: "npm-package"

.github/workflows/scripts.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
name: Run script unit tests
3939
runs-on: ubuntu-latest
4040
# This runs on Alpine to make sure we're testing with actual sh.
41-
container: "alpine:3.14"
41+
container: "alpine:3.16"
4242
steps:
4343
- name: Checkout repo
4444
uses: actions/checkout@v3

.github/workflows/trivy-docker.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ jobs:
5151
uses: actions/checkout@v3
5252

5353
- name: Run Trivy vulnerability scanner in image mode
54-
uses: aquasecurity/trivy-action@e27605859b9550f81ddd818eb816c8cb83cf9650
54+
uses: aquasecurity/trivy-action@cb606dfdb0d2b3698ace62192088ef4f5360b24f
5555
with:
5656
image-ref: "docker.io/codercom/code-server:latest"
5757
ignore-unfixed: true

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
lib/vscode

.prettierrc.yaml

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,3 @@ trailingComma: all
44
arrowParens: always
55
singleQuote: false
66
useTabs: false
7-
8-
overrides:
9-
# Attempt to keep VScode's existing code style intact.
10-
- files: "lib/vscode/**/*.ts"
11-
options:
12-
# No limit defined upstream.
13-
printWidth: 10000
14-
semi: true
15-
singleQuote: true
16-
useTabs: true
17-
arrowParens: avoid

CHANGELOG.md

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,62 @@ Code v99.99.999
2020
2121
-->
2222

23+
## [4.5.1](https://github.com/coder/code-server/releases/tag/v4.5.1) - 2022-07-18
24+
25+
Code v1.68.1
26+
27+
### Changed
28+
29+
- We now use `release/v<0.0.0>` for the release branch name so it doesn't
30+
conflict with the tag name
31+
- Added `.prettierignore` to ignore formatting files in `lib/vscode`
32+
33+
### Added
34+
35+
- Allow more comprehensive affinity config in Helm chart
36+
- Added custom message in Homebrew PR to make sure code-server maintainers are
37+
tagged
38+
- Allow setting `priorityClassName` via Helm chart
39+
- Added troubleshooting docs to `CONTRIBUTING.md`
40+
41+
### Fixed
42+
43+
- Removed default memory limit which was set via `NODE_OPTIONS`
44+
- Changed output in pipe to make it easier to debug code-server when doing live
45+
edits
46+
- Fixed display-language patch to use correct path which broke in 4.5.0
47+
- Fixed multiple code-server windows opening when using the code-server CLI in
48+
the Integrated Terminal
49+
- Fixed Integrated Terminal not working when web base was not the root path
50+
51+
### Security
52+
53+
- Updated `glob-parent` version in dependencies
54+
55+
## [4.5.0](https://github.com/coder/code-server/releases/tag/v4.5.0) - 2022-06-29
56+
57+
Code v1.68.1
58+
59+
### Changed
60+
61+
- Updated codecov to use codecov uploader
62+
- Moved integration tests to Jest
63+
- Fixed docker release to only download .deb
64+
- Upgraded to Code 1.68.1
65+
- Install `nfpm` from GitHub
66+
- Upgraded to TypeScript 4.6
67+
68+
### Added
69+
70+
- Added tests for `open`, `isWsl`, `handlePasswordValidation`
71+
- Provided alternate image registry to dockerhub
72+
- Allowed users to have scripts run on container with `ENTRYPOINTD` environment
73+
variable
74+
75+
### Fixed
76+
77+
- Fixed open CLI command to work on macOS
78+
2379
## [4.4.0](https://github.com/coder/code-server/releases/tag/v4.4.0) - 2022-05-06
2480

2581
Code v1.66.2

ci/Caddyfile

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
admin localhost:4444
3+
}
4+
:8000 {
5+
@portLocalhost path_regexp port ^/([0-9]+)\/ide
6+
handle @portLocalhost {
7+
uri strip_prefix {re.port.1}/ide
8+
reverse_proxy localhost:{re.port.1}
9+
}
10+
11+
handle {
12+
respond "Bad hostname" 400
13+
}
14+
15+
}

0 commit comments

Comments
 (0)