code-server/.github/workflows/build.yaml

384 lines
11 KiB
YAML
Raw Normal View History

2021-07-03 02:18:37 +08:00
name: Build
2020-05-07 12:06:55 +08:00
on:
push:
branches:
- main
pull_request:
branches:
- main
2020-05-07 12:06:55 +08:00
# Cancel in-progress runs for pull requests when developers push
# additional changes, and serialize builds in branches.
# https://docs.github.com/en/actions/using-jobs/using-concurrency#example-using-concurrency-to-cancel-any-in-progress-job-or-run
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
# Note: if: success() is used in several jobs -
# this ensures that it only executes if all previous jobs succeeded.
# if: steps.cache-node-modules.outputs.cache-hit != 'true'
# will skip running `npm install` if it successfully fetched from cache
2020-05-07 12:06:55 +08:00
jobs:
prettier:
feat(ci): refactor build workflow (#5572) * refactor: remove stylelint * refactor: move shellcheck to separate job * refactor: add helm script and job * refactor: add eslint job and yarn script * fix(test/tsconfig): exclude test-plugin * refactor: delete lint, add typecheck job * refactor: remove prebuild * wip: add notes about unit test refactor * refactor: delete buggy socket test This test was really added to in get cover specific lines but it's buggy and only passes sometimes locally. I think it's okay to remove because: - it's an implementation detail (not user facing) - not preventing any specific regressions * refactor: move test-plugin to integration suite This seems more appropriate given this tests how a plugin might work within code-server. * wip * wip: refactor vscode integration tests * refactor: move unit tests to separate job * fix: formatting * Revert "wip: refactor vscode integration tests" This reverts commit 13286bf4c9762b7d6c6176464d94b1fc316fb568. * Revert "refactor: move unit tests to separate job" This reverts commit 6c87b540b49c8d56266c8925c4fd32ed760b23bf. * feat: collect codecov integration tests * fixup! feat: collect codecov integration tests * fixup! feat: collect codecov integration tests * fixup!: move helm step * fixup!: update ids for caching * trigger ci * trigger ci * chore: clean up names in security.yaml * fixup!: remove .tsx * fixup!: change to src/**" * fixup!: move helm cmd to yaml * fixup!: always build test plugin * fixup!: fix plugin typings * fixup! add back flakey test * fixup!: only install helm deps if changes * fixup!: revert node mod caching * dont keep, test for asher * fixup!: add make to centos * refactor: add test:native This adds a new script to run native tests (i.e. --help which should run in ci on all platforms). * try updating glibc * try 2.25 * Revert "refactor: move test-plugin to integration suite" This reverts commit bc02005dc097a10b5216b616ff0bd7a911240748. I couldn't get past some GLIBC errors in CI so moving back to unit tests. * Revert "try updating glibc" This reverts commit 02ed560f223a8505cb5e6e2014055cb256a407b0. * fixup! * asher: again * try this for ts changes * fixup * refactor: scripts.yml -> scripts.yaml * fixup!: move lint-sh to scripts.yaml * fixup!: use apk for lint scripts * fixup! fixup!: use apk for lint scripts * fixup!: remove typecheck step * fix: pattern for lint ts files * test: lint should fail * fixup! fixup!: use apk for lint scripts * Revert "test: lint should fail" This reverts commit 158c64db044c24f2f8ffd082cc769f06876d6957. * fixup!: skip cancel workflow on forks Looks like the cancel action workflow can't run on forks due to secrets. See https://github.com/andymckay/cancel-action/issues/4 * fixup: remove cancel-workflow * fixup! fixup! fixup!: use apk for lint scripts * fixup! fixup! fixup!: use apk for lint scripts * fixup!: fix yarn key * fixup!: add fetch-depth 0
2022-09-23 03:33:32 +08:00
name: Format with Prettier
runs-on: ubuntu-22.04
feat(ci): refactor build workflow (#5572) * refactor: remove stylelint * refactor: move shellcheck to separate job * refactor: add helm script and job * refactor: add eslint job and yarn script * fix(test/tsconfig): exclude test-plugin * refactor: delete lint, add typecheck job * refactor: remove prebuild * wip: add notes about unit test refactor * refactor: delete buggy socket test This test was really added to in get cover specific lines but it's buggy and only passes sometimes locally. I think it's okay to remove because: - it's an implementation detail (not user facing) - not preventing any specific regressions * refactor: move test-plugin to integration suite This seems more appropriate given this tests how a plugin might work within code-server. * wip * wip: refactor vscode integration tests * refactor: move unit tests to separate job * fix: formatting * Revert "wip: refactor vscode integration tests" This reverts commit 13286bf4c9762b7d6c6176464d94b1fc316fb568. * Revert "refactor: move unit tests to separate job" This reverts commit 6c87b540b49c8d56266c8925c4fd32ed760b23bf. * feat: collect codecov integration tests * fixup! feat: collect codecov integration tests * fixup! feat: collect codecov integration tests * fixup!: move helm step * fixup!: update ids for caching * trigger ci * trigger ci * chore: clean up names in security.yaml * fixup!: remove .tsx * fixup!: change to src/**" * fixup!: move helm cmd to yaml * fixup!: always build test plugin * fixup!: fix plugin typings * fixup! add back flakey test * fixup!: only install helm deps if changes * fixup!: revert node mod caching * dont keep, test for asher * fixup!: add make to centos * refactor: add test:native This adds a new script to run native tests (i.e. --help which should run in ci on all platforms). * try updating glibc * try 2.25 * Revert "refactor: move test-plugin to integration suite" This reverts commit bc02005dc097a10b5216b616ff0bd7a911240748. I couldn't get past some GLIBC errors in CI so moving back to unit tests. * Revert "try updating glibc" This reverts commit 02ed560f223a8505cb5e6e2014055cb256a407b0. * fixup! * asher: again * try this for ts changes * fixup * refactor: scripts.yml -> scripts.yaml * fixup!: move lint-sh to scripts.yaml * fixup!: use apk for lint scripts * fixup! fixup!: use apk for lint scripts * fixup!: remove typecheck step * fix: pattern for lint ts files * test: lint should fail * fixup! fixup!: use apk for lint scripts * Revert "test: lint should fail" This reverts commit 158c64db044c24f2f8ffd082cc769f06876d6957. * fixup!: skip cancel workflow on forks Looks like the cancel action workflow can't run on forks due to secrets. See https://github.com/andymckay/cancel-action/issues/4 * fixup: remove cancel-workflow * fixup! fixup! fixup!: use apk for lint scripts * fixup! fixup! fixup!: use apk for lint scripts * fixup!: fix yarn key * fixup!: add fetch-depth 0
2022-09-23 03:33:32 +08:00
timeout-minutes: 5
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Run prettier with actionsx/prettier
uses: actionsx/prettier@v3
with:
args: --check --log-level=warn .
doctoc:
name: Doctoc markdown files
runs-on: ubuntu-22.04
timeout-minutes: 5
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v45
with:
files: |
docs/**
- name: Install Node.js
if: steps.changed-files.outputs.any_changed == 'true'
uses: actions/setup-node@v4
with:
node-version-file: .node-version
cache: npm
cache-dependency-path: |
package-lock.json
test/package-lock.json
- if: steps.changed-files.outputs.any_changed == 'true'
run: SKIP_SUBMODULE_DEPS=1 npm ci
feat(ci): refactor build workflow (#5572) * refactor: remove stylelint * refactor: move shellcheck to separate job * refactor: add helm script and job * refactor: add eslint job and yarn script * fix(test/tsconfig): exclude test-plugin * refactor: delete lint, add typecheck job * refactor: remove prebuild * wip: add notes about unit test refactor * refactor: delete buggy socket test This test was really added to in get cover specific lines but it's buggy and only passes sometimes locally. I think it's okay to remove because: - it's an implementation detail (not user facing) - not preventing any specific regressions * refactor: move test-plugin to integration suite This seems more appropriate given this tests how a plugin might work within code-server. * wip * wip: refactor vscode integration tests * refactor: move unit tests to separate job * fix: formatting * Revert "wip: refactor vscode integration tests" This reverts commit 13286bf4c9762b7d6c6176464d94b1fc316fb568. * Revert "refactor: move unit tests to separate job" This reverts commit 6c87b540b49c8d56266c8925c4fd32ed760b23bf. * feat: collect codecov integration tests * fixup! feat: collect codecov integration tests * fixup! feat: collect codecov integration tests * fixup!: move helm step * fixup!: update ids for caching * trigger ci * trigger ci * chore: clean up names in security.yaml * fixup!: remove .tsx * fixup!: change to src/**" * fixup!: move helm cmd to yaml * fixup!: always build test plugin * fixup!: fix plugin typings * fixup! add back flakey test * fixup!: only install helm deps if changes * fixup!: revert node mod caching * dont keep, test for asher * fixup!: add make to centos * refactor: add test:native This adds a new script to run native tests (i.e. --help which should run in ci on all platforms). * try updating glibc * try 2.25 * Revert "refactor: move test-plugin to integration suite" This reverts commit bc02005dc097a10b5216b616ff0bd7a911240748. I couldn't get past some GLIBC errors in CI so moving back to unit tests. * Revert "try updating glibc" This reverts commit 02ed560f223a8505cb5e6e2014055cb256a407b0. * fixup! * asher: again * try this for ts changes * fixup * refactor: scripts.yml -> scripts.yaml * fixup!: move lint-sh to scripts.yaml * fixup!: use apk for lint scripts * fixup! fixup!: use apk for lint scripts * fixup!: remove typecheck step * fix: pattern for lint ts files * test: lint should fail * fixup! fixup!: use apk for lint scripts * Revert "test: lint should fail" This reverts commit 158c64db044c24f2f8ffd082cc769f06876d6957. * fixup!: skip cancel workflow on forks Looks like the cancel action workflow can't run on forks due to secrets. See https://github.com/andymckay/cancel-action/issues/4 * fixup: remove cancel-workflow * fixup! fixup! fixup!: use apk for lint scripts * fixup! fixup! fixup!: use apk for lint scripts * fixup!: fix yarn key * fixup!: add fetch-depth 0
2022-09-23 03:33:32 +08:00
- if: steps.changed-files.outputs.any_changed == 'true'
run: npm run doctoc
feat(ci): refactor build workflow (#5572) * refactor: remove stylelint * refactor: move shellcheck to separate job * refactor: add helm script and job * refactor: add eslint job and yarn script * fix(test/tsconfig): exclude test-plugin * refactor: delete lint, add typecheck job * refactor: remove prebuild * wip: add notes about unit test refactor * refactor: delete buggy socket test This test was really added to in get cover specific lines but it's buggy and only passes sometimes locally. I think it's okay to remove because: - it's an implementation detail (not user facing) - not preventing any specific regressions * refactor: move test-plugin to integration suite This seems more appropriate given this tests how a plugin might work within code-server. * wip * wip: refactor vscode integration tests * refactor: move unit tests to separate job * fix: formatting * Revert "wip: refactor vscode integration tests" This reverts commit 13286bf4c9762b7d6c6176464d94b1fc316fb568. * Revert "refactor: move unit tests to separate job" This reverts commit 6c87b540b49c8d56266c8925c4fd32ed760b23bf. * feat: collect codecov integration tests * fixup! feat: collect codecov integration tests * fixup! feat: collect codecov integration tests * fixup!: move helm step * fixup!: update ids for caching * trigger ci * trigger ci * chore: clean up names in security.yaml * fixup!: remove .tsx * fixup!: change to src/**" * fixup!: move helm cmd to yaml * fixup!: always build test plugin * fixup!: fix plugin typings * fixup! add back flakey test * fixup!: only install helm deps if changes * fixup!: revert node mod caching * dont keep, test for asher * fixup!: add make to centos * refactor: add test:native This adds a new script to run native tests (i.e. --help which should run in ci on all platforms). * try updating glibc * try 2.25 * Revert "refactor: move test-plugin to integration suite" This reverts commit bc02005dc097a10b5216b616ff0bd7a911240748. I couldn't get past some GLIBC errors in CI so moving back to unit tests. * Revert "try updating glibc" This reverts commit 02ed560f223a8505cb5e6e2014055cb256a407b0. * fixup! * asher: again * try this for ts changes * fixup * refactor: scripts.yml -> scripts.yaml * fixup!: move lint-sh to scripts.yaml * fixup!: use apk for lint scripts * fixup! fixup!: use apk for lint scripts * fixup!: remove typecheck step * fix: pattern for lint ts files * test: lint should fail * fixup! fixup!: use apk for lint scripts * Revert "test: lint should fail" This reverts commit 158c64db044c24f2f8ffd082cc769f06876d6957. * fixup!: skip cancel workflow on forks Looks like the cancel action workflow can't run on forks due to secrets. See https://github.com/andymckay/cancel-action/issues/4 * fixup: remove cancel-workflow * fixup! fixup! fixup!: use apk for lint scripts * fixup! fixup! fixup!: use apk for lint scripts * fixup!: fix yarn key * fixup!: add fetch-depth 0
2022-09-23 03:33:32 +08:00
lint-helm:
name: Lint Helm chart
runs-on: ubuntu-22.04
feat(ci): refactor build workflow (#5572) * refactor: remove stylelint * refactor: move shellcheck to separate job * refactor: add helm script and job * refactor: add eslint job and yarn script * fix(test/tsconfig): exclude test-plugin * refactor: delete lint, add typecheck job * refactor: remove prebuild * wip: add notes about unit test refactor * refactor: delete buggy socket test This test was really added to in get cover specific lines but it's buggy and only passes sometimes locally. I think it's okay to remove because: - it's an implementation detail (not user facing) - not preventing any specific regressions * refactor: move test-plugin to integration suite This seems more appropriate given this tests how a plugin might work within code-server. * wip * wip: refactor vscode integration tests * refactor: move unit tests to separate job * fix: formatting * Revert "wip: refactor vscode integration tests" This reverts commit 13286bf4c9762b7d6c6176464d94b1fc316fb568. * Revert "refactor: move unit tests to separate job" This reverts commit 6c87b540b49c8d56266c8925c4fd32ed760b23bf. * feat: collect codecov integration tests * fixup! feat: collect codecov integration tests * fixup! feat: collect codecov integration tests * fixup!: move helm step * fixup!: update ids for caching * trigger ci * trigger ci * chore: clean up names in security.yaml * fixup!: remove .tsx * fixup!: change to src/**" * fixup!: move helm cmd to yaml * fixup!: always build test plugin * fixup!: fix plugin typings * fixup! add back flakey test * fixup!: only install helm deps if changes * fixup!: revert node mod caching * dont keep, test for asher * fixup!: add make to centos * refactor: add test:native This adds a new script to run native tests (i.e. --help which should run in ci on all platforms). * try updating glibc * try 2.25 * Revert "refactor: move test-plugin to integration suite" This reverts commit bc02005dc097a10b5216b616ff0bd7a911240748. I couldn't get past some GLIBC errors in CI so moving back to unit tests. * Revert "try updating glibc" This reverts commit 02ed560f223a8505cb5e6e2014055cb256a407b0. * fixup! * asher: again * try this for ts changes * fixup * refactor: scripts.yml -> scripts.yaml * fixup!: move lint-sh to scripts.yaml * fixup!: use apk for lint scripts * fixup! fixup!: use apk for lint scripts * fixup!: remove typecheck step * fix: pattern for lint ts files * test: lint should fail * fixup! fixup!: use apk for lint scripts * Revert "test: lint should fail" This reverts commit 158c64db044c24f2f8ffd082cc769f06876d6957. * fixup!: skip cancel workflow on forks Looks like the cancel action workflow can't run on forks due to secrets. See https://github.com/andymckay/cancel-action/issues/4 * fixup: remove cancel-workflow * fixup! fixup! fixup!: use apk for lint scripts * fixup! fixup! fixup!: use apk for lint scripts * fixup!: fix yarn key * fixup!: add fetch-depth 0
2022-09-23 03:33:32 +08:00
timeout-minutes: 5
steps:
- name: Checkout repo
uses: actions/checkout@v4
feat(ci): refactor build workflow (#5572) * refactor: remove stylelint * refactor: move shellcheck to separate job * refactor: add helm script and job * refactor: add eslint job and yarn script * fix(test/tsconfig): exclude test-plugin * refactor: delete lint, add typecheck job * refactor: remove prebuild * wip: add notes about unit test refactor * refactor: delete buggy socket test This test was really added to in get cover specific lines but it's buggy and only passes sometimes locally. I think it's okay to remove because: - it's an implementation detail (not user facing) - not preventing any specific regressions * refactor: move test-plugin to integration suite This seems more appropriate given this tests how a plugin might work within code-server. * wip * wip: refactor vscode integration tests * refactor: move unit tests to separate job * fix: formatting * Revert "wip: refactor vscode integration tests" This reverts commit 13286bf4c9762b7d6c6176464d94b1fc316fb568. * Revert "refactor: move unit tests to separate job" This reverts commit 6c87b540b49c8d56266c8925c4fd32ed760b23bf. * feat: collect codecov integration tests * fixup! feat: collect codecov integration tests * fixup! feat: collect codecov integration tests * fixup!: move helm step * fixup!: update ids for caching * trigger ci * trigger ci * chore: clean up names in security.yaml * fixup!: remove .tsx * fixup!: change to src/**" * fixup!: move helm cmd to yaml * fixup!: always build test plugin * fixup!: fix plugin typings * fixup! add back flakey test * fixup!: only install helm deps if changes * fixup!: revert node mod caching * dont keep, test for asher * fixup!: add make to centos * refactor: add test:native This adds a new script to run native tests (i.e. --help which should run in ci on all platforms). * try updating glibc * try 2.25 * Revert "refactor: move test-plugin to integration suite" This reverts commit bc02005dc097a10b5216b616ff0bd7a911240748. I couldn't get past some GLIBC errors in CI so moving back to unit tests. * Revert "try updating glibc" This reverts commit 02ed560f223a8505cb5e6e2014055cb256a407b0. * fixup! * asher: again * try this for ts changes * fixup * refactor: scripts.yml -> scripts.yaml * fixup!: move lint-sh to scripts.yaml * fixup!: use apk for lint scripts * fixup! fixup!: use apk for lint scripts * fixup!: remove typecheck step * fix: pattern for lint ts files * test: lint should fail * fixup! fixup!: use apk for lint scripts * Revert "test: lint should fail" This reverts commit 158c64db044c24f2f8ffd082cc769f06876d6957. * fixup!: skip cancel workflow on forks Looks like the cancel action workflow can't run on forks due to secrets. See https://github.com/andymckay/cancel-action/issues/4 * fixup: remove cancel-workflow * fixup! fixup! fixup!: use apk for lint scripts * fixup! fixup! fixup!: use apk for lint scripts * fixup!: fix yarn key * fixup!: add fetch-depth 0
2022-09-23 03:33:32 +08:00
with:
fetch-depth: 2
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v45
feat(ci): refactor build workflow (#5572) * refactor: remove stylelint * refactor: move shellcheck to separate job * refactor: add helm script and job * refactor: add eslint job and yarn script * fix(test/tsconfig): exclude test-plugin * refactor: delete lint, add typecheck job * refactor: remove prebuild * wip: add notes about unit test refactor * refactor: delete buggy socket test This test was really added to in get cover specific lines but it's buggy and only passes sometimes locally. I think it's okay to remove because: - it's an implementation detail (not user facing) - not preventing any specific regressions * refactor: move test-plugin to integration suite This seems more appropriate given this tests how a plugin might work within code-server. * wip * wip: refactor vscode integration tests * refactor: move unit tests to separate job * fix: formatting * Revert "wip: refactor vscode integration tests" This reverts commit 13286bf4c9762b7d6c6176464d94b1fc316fb568. * Revert "refactor: move unit tests to separate job" This reverts commit 6c87b540b49c8d56266c8925c4fd32ed760b23bf. * feat: collect codecov integration tests * fixup! feat: collect codecov integration tests * fixup! feat: collect codecov integration tests * fixup!: move helm step * fixup!: update ids for caching * trigger ci * trigger ci * chore: clean up names in security.yaml * fixup!: remove .tsx * fixup!: change to src/**" * fixup!: move helm cmd to yaml * fixup!: always build test plugin * fixup!: fix plugin typings * fixup! add back flakey test * fixup!: only install helm deps if changes * fixup!: revert node mod caching * dont keep, test for asher * fixup!: add make to centos * refactor: add test:native This adds a new script to run native tests (i.e. --help which should run in ci on all platforms). * try updating glibc * try 2.25 * Revert "refactor: move test-plugin to integration suite" This reverts commit bc02005dc097a10b5216b616ff0bd7a911240748. I couldn't get past some GLIBC errors in CI so moving back to unit tests. * Revert "try updating glibc" This reverts commit 02ed560f223a8505cb5e6e2014055cb256a407b0. * fixup! * asher: again * try this for ts changes * fixup * refactor: scripts.yml -> scripts.yaml * fixup!: move lint-sh to scripts.yaml * fixup!: use apk for lint scripts * fixup! fixup!: use apk for lint scripts * fixup!: remove typecheck step * fix: pattern for lint ts files * test: lint should fail * fixup! fixup!: use apk for lint scripts * Revert "test: lint should fail" This reverts commit 158c64db044c24f2f8ffd082cc769f06876d6957. * fixup!: skip cancel workflow on forks Looks like the cancel action workflow can't run on forks due to secrets. See https://github.com/andymckay/cancel-action/issues/4 * fixup: remove cancel-workflow * fixup! fixup! fixup!: use apk for lint scripts * fixup! fixup! fixup!: use apk for lint scripts * fixup!: fix yarn key * fixup!: add fetch-depth 0
2022-09-23 03:33:32 +08:00
with:
files: |
ci/helm-chart/**
- name: Install helm
feat(ci): refactor build workflow (#5572) * refactor: remove stylelint * refactor: move shellcheck to separate job * refactor: add helm script and job * refactor: add eslint job and yarn script * fix(test/tsconfig): exclude test-plugin * refactor: delete lint, add typecheck job * refactor: remove prebuild * wip: add notes about unit test refactor * refactor: delete buggy socket test This test was really added to in get cover specific lines but it's buggy and only passes sometimes locally. I think it's okay to remove because: - it's an implementation detail (not user facing) - not preventing any specific regressions * refactor: move test-plugin to integration suite This seems more appropriate given this tests how a plugin might work within code-server. * wip * wip: refactor vscode integration tests * refactor: move unit tests to separate job * fix: formatting * Revert "wip: refactor vscode integration tests" This reverts commit 13286bf4c9762b7d6c6176464d94b1fc316fb568. * Revert "refactor: move unit tests to separate job" This reverts commit 6c87b540b49c8d56266c8925c4fd32ed760b23bf. * feat: collect codecov integration tests * fixup! feat: collect codecov integration tests * fixup! feat: collect codecov integration tests * fixup!: move helm step * fixup!: update ids for caching * trigger ci * trigger ci * chore: clean up names in security.yaml * fixup!: remove .tsx * fixup!: change to src/**" * fixup!: move helm cmd to yaml * fixup!: always build test plugin * fixup!: fix plugin typings * fixup! add back flakey test * fixup!: only install helm deps if changes * fixup!: revert node mod caching * dont keep, test for asher * fixup!: add make to centos * refactor: add test:native This adds a new script to run native tests (i.e. --help which should run in ci on all platforms). * try updating glibc * try 2.25 * Revert "refactor: move test-plugin to integration suite" This reverts commit bc02005dc097a10b5216b616ff0bd7a911240748. I couldn't get past some GLIBC errors in CI so moving back to unit tests. * Revert "try updating glibc" This reverts commit 02ed560f223a8505cb5e6e2014055cb256a407b0. * fixup! * asher: again * try this for ts changes * fixup * refactor: scripts.yml -> scripts.yaml * fixup!: move lint-sh to scripts.yaml * fixup!: use apk for lint scripts * fixup! fixup!: use apk for lint scripts * fixup!: remove typecheck step * fix: pattern for lint ts files * test: lint should fail * fixup! fixup!: use apk for lint scripts * Revert "test: lint should fail" This reverts commit 158c64db044c24f2f8ffd082cc769f06876d6957. * fixup!: skip cancel workflow on forks Looks like the cancel action workflow can't run on forks due to secrets. See https://github.com/andymckay/cancel-action/issues/4 * fixup: remove cancel-workflow * fixup! fixup! fixup!: use apk for lint scripts * fixup! fixup! fixup!: use apk for lint scripts * fixup!: fix yarn key * fixup!: add fetch-depth 0
2022-09-23 03:33:32 +08:00
if: steps.changed-files.outputs.any_changed == 'true'
uses: azure/setup-helm@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
- if: steps.changed-files.outputs.any_changed == 'true'
run: helm plugin install https://github.com/instrumenta/helm-kubeval
- if: steps.changed-files.outputs.any_changed == 'true'
feat(ci): refactor build workflow (#5572) * refactor: remove stylelint * refactor: move shellcheck to separate job * refactor: add helm script and job * refactor: add eslint job and yarn script * fix(test/tsconfig): exclude test-plugin * refactor: delete lint, add typecheck job * refactor: remove prebuild * wip: add notes about unit test refactor * refactor: delete buggy socket test This test was really added to in get cover specific lines but it's buggy and only passes sometimes locally. I think it's okay to remove because: - it's an implementation detail (not user facing) - not preventing any specific regressions * refactor: move test-plugin to integration suite This seems more appropriate given this tests how a plugin might work within code-server. * wip * wip: refactor vscode integration tests * refactor: move unit tests to separate job * fix: formatting * Revert "wip: refactor vscode integration tests" This reverts commit 13286bf4c9762b7d6c6176464d94b1fc316fb568. * Revert "refactor: move unit tests to separate job" This reverts commit 6c87b540b49c8d56266c8925c4fd32ed760b23bf. * feat: collect codecov integration tests * fixup! feat: collect codecov integration tests * fixup! feat: collect codecov integration tests * fixup!: move helm step * fixup!: update ids for caching * trigger ci * trigger ci * chore: clean up names in security.yaml * fixup!: remove .tsx * fixup!: change to src/**" * fixup!: move helm cmd to yaml * fixup!: always build test plugin * fixup!: fix plugin typings * fixup! add back flakey test * fixup!: only install helm deps if changes * fixup!: revert node mod caching * dont keep, test for asher * fixup!: add make to centos * refactor: add test:native This adds a new script to run native tests (i.e. --help which should run in ci on all platforms). * try updating glibc * try 2.25 * Revert "refactor: move test-plugin to integration suite" This reverts commit bc02005dc097a10b5216b616ff0bd7a911240748. I couldn't get past some GLIBC errors in CI so moving back to unit tests. * Revert "try updating glibc" This reverts commit 02ed560f223a8505cb5e6e2014055cb256a407b0. * fixup! * asher: again * try this for ts changes * fixup * refactor: scripts.yml -> scripts.yaml * fixup!: move lint-sh to scripts.yaml * fixup!: use apk for lint scripts * fixup! fixup!: use apk for lint scripts * fixup!: remove typecheck step * fix: pattern for lint ts files * test: lint should fail * fixup! fixup!: use apk for lint scripts * Revert "test: lint should fail" This reverts commit 158c64db044c24f2f8ffd082cc769f06876d6957. * fixup!: skip cancel workflow on forks Looks like the cancel action workflow can't run on forks due to secrets. See https://github.com/andymckay/cancel-action/issues/4 * fixup: remove cancel-workflow * fixup! fixup! fixup!: use apk for lint scripts * fixup! fixup! fixup!: use apk for lint scripts * fixup!: fix yarn key * fixup!: add fetch-depth 0
2022-09-23 03:33:32 +08:00
run: helm kubeval ci/helm-chart
lint-ts:
name: Lint TypeScript files
runs-on: ubuntu-22.04
feat(ci): refactor build workflow (#5572) * refactor: remove stylelint * refactor: move shellcheck to separate job * refactor: add helm script and job * refactor: add eslint job and yarn script * fix(test/tsconfig): exclude test-plugin * refactor: delete lint, add typecheck job * refactor: remove prebuild * wip: add notes about unit test refactor * refactor: delete buggy socket test This test was really added to in get cover specific lines but it's buggy and only passes sometimes locally. I think it's okay to remove because: - it's an implementation detail (not user facing) - not preventing any specific regressions * refactor: move test-plugin to integration suite This seems more appropriate given this tests how a plugin might work within code-server. * wip * wip: refactor vscode integration tests * refactor: move unit tests to separate job * fix: formatting * Revert "wip: refactor vscode integration tests" This reverts commit 13286bf4c9762b7d6c6176464d94b1fc316fb568. * Revert "refactor: move unit tests to separate job" This reverts commit 6c87b540b49c8d56266c8925c4fd32ed760b23bf. * feat: collect codecov integration tests * fixup! feat: collect codecov integration tests * fixup! feat: collect codecov integration tests * fixup!: move helm step * fixup!: update ids for caching * trigger ci * trigger ci * chore: clean up names in security.yaml * fixup!: remove .tsx * fixup!: change to src/**" * fixup!: move helm cmd to yaml * fixup!: always build test plugin * fixup!: fix plugin typings * fixup! add back flakey test * fixup!: only install helm deps if changes * fixup!: revert node mod caching * dont keep, test for asher * fixup!: add make to centos * refactor: add test:native This adds a new script to run native tests (i.e. --help which should run in ci on all platforms). * try updating glibc * try 2.25 * Revert "refactor: move test-plugin to integration suite" This reverts commit bc02005dc097a10b5216b616ff0bd7a911240748. I couldn't get past some GLIBC errors in CI so moving back to unit tests. * Revert "try updating glibc" This reverts commit 02ed560f223a8505cb5e6e2014055cb256a407b0. * fixup! * asher: again * try this for ts changes * fixup * refactor: scripts.yml -> scripts.yaml * fixup!: move lint-sh to scripts.yaml * fixup!: use apk for lint scripts * fixup! fixup!: use apk for lint scripts * fixup!: remove typecheck step * fix: pattern for lint ts files * test: lint should fail * fixup! fixup!: use apk for lint scripts * Revert "test: lint should fail" This reverts commit 158c64db044c24f2f8ffd082cc769f06876d6957. * fixup!: skip cancel workflow on forks Looks like the cancel action workflow can't run on forks due to secrets. See https://github.com/andymckay/cancel-action/issues/4 * fixup: remove cancel-workflow * fixup! fixup! fixup!: use apk for lint scripts * fixup! fixup! fixup!: use apk for lint scripts * fixup!: fix yarn key * fixup!: add fetch-depth 0
2022-09-23 03:33:32 +08:00
timeout-minutes: 5
steps:
- name: Checkout repo
uses: actions/checkout@v4
feat(ci): refactor build workflow (#5572) * refactor: remove stylelint * refactor: move shellcheck to separate job * refactor: add helm script and job * refactor: add eslint job and yarn script * fix(test/tsconfig): exclude test-plugin * refactor: delete lint, add typecheck job * refactor: remove prebuild * wip: add notes about unit test refactor * refactor: delete buggy socket test This test was really added to in get cover specific lines but it's buggy and only passes sometimes locally. I think it's okay to remove because: - it's an implementation detail (not user facing) - not preventing any specific regressions * refactor: move test-plugin to integration suite This seems more appropriate given this tests how a plugin might work within code-server. * wip * wip: refactor vscode integration tests * refactor: move unit tests to separate job * fix: formatting * Revert "wip: refactor vscode integration tests" This reverts commit 13286bf4c9762b7d6c6176464d94b1fc316fb568. * Revert "refactor: move unit tests to separate job" This reverts commit 6c87b540b49c8d56266c8925c4fd32ed760b23bf. * feat: collect codecov integration tests * fixup! feat: collect codecov integration tests * fixup! feat: collect codecov integration tests * fixup!: move helm step * fixup!: update ids for caching * trigger ci * trigger ci * chore: clean up names in security.yaml * fixup!: remove .tsx * fixup!: change to src/**" * fixup!: move helm cmd to yaml * fixup!: always build test plugin * fixup!: fix plugin typings * fixup! add back flakey test * fixup!: only install helm deps if changes * fixup!: revert node mod caching * dont keep, test for asher * fixup!: add make to centos * refactor: add test:native This adds a new script to run native tests (i.e. --help which should run in ci on all platforms). * try updating glibc * try 2.25 * Revert "refactor: move test-plugin to integration suite" This reverts commit bc02005dc097a10b5216b616ff0bd7a911240748. I couldn't get past some GLIBC errors in CI so moving back to unit tests. * Revert "try updating glibc" This reverts commit 02ed560f223a8505cb5e6e2014055cb256a407b0. * fixup! * asher: again * try this for ts changes * fixup * refactor: scripts.yml -> scripts.yaml * fixup!: move lint-sh to scripts.yaml * fixup!: use apk for lint scripts * fixup! fixup!: use apk for lint scripts * fixup!: remove typecheck step * fix: pattern for lint ts files * test: lint should fail * fixup! fixup!: use apk for lint scripts * Revert "test: lint should fail" This reverts commit 158c64db044c24f2f8ffd082cc769f06876d6957. * fixup!: skip cancel workflow on forks Looks like the cancel action workflow can't run on forks due to secrets. See https://github.com/andymckay/cancel-action/issues/4 * fixup: remove cancel-workflow * fixup! fixup! fixup!: use apk for lint scripts * fixup! fixup! fixup!: use apk for lint scripts * fixup!: fix yarn key * fixup!: add fetch-depth 0
2022-09-23 03:33:32 +08:00
with:
fetch-depth: 2
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v45
feat(ci): refactor build workflow (#5572) * refactor: remove stylelint * refactor: move shellcheck to separate job * refactor: add helm script and job * refactor: add eslint job and yarn script * fix(test/tsconfig): exclude test-plugin * refactor: delete lint, add typecheck job * refactor: remove prebuild * wip: add notes about unit test refactor * refactor: delete buggy socket test This test was really added to in get cover specific lines but it's buggy and only passes sometimes locally. I think it's okay to remove because: - it's an implementation detail (not user facing) - not preventing any specific regressions * refactor: move test-plugin to integration suite This seems more appropriate given this tests how a plugin might work within code-server. * wip * wip: refactor vscode integration tests * refactor: move unit tests to separate job * fix: formatting * Revert "wip: refactor vscode integration tests" This reverts commit 13286bf4c9762b7d6c6176464d94b1fc316fb568. * Revert "refactor: move unit tests to separate job" This reverts commit 6c87b540b49c8d56266c8925c4fd32ed760b23bf. * feat: collect codecov integration tests * fixup! feat: collect codecov integration tests * fixup! feat: collect codecov integration tests * fixup!: move helm step * fixup!: update ids for caching * trigger ci * trigger ci * chore: clean up names in security.yaml * fixup!: remove .tsx * fixup!: change to src/**" * fixup!: move helm cmd to yaml * fixup!: always build test plugin * fixup!: fix plugin typings * fixup! add back flakey test * fixup!: only install helm deps if changes * fixup!: revert node mod caching * dont keep, test for asher * fixup!: add make to centos * refactor: add test:native This adds a new script to run native tests (i.e. --help which should run in ci on all platforms). * try updating glibc * try 2.25 * Revert "refactor: move test-plugin to integration suite" This reverts commit bc02005dc097a10b5216b616ff0bd7a911240748. I couldn't get past some GLIBC errors in CI so moving back to unit tests. * Revert "try updating glibc" This reverts commit 02ed560f223a8505cb5e6e2014055cb256a407b0. * fixup! * asher: again * try this for ts changes * fixup * refactor: scripts.yml -> scripts.yaml * fixup!: move lint-sh to scripts.yaml * fixup!: use apk for lint scripts * fixup! fixup!: use apk for lint scripts * fixup!: remove typecheck step * fix: pattern for lint ts files * test: lint should fail * fixup! fixup!: use apk for lint scripts * Revert "test: lint should fail" This reverts commit 158c64db044c24f2f8ffd082cc769f06876d6957. * fixup!: skip cancel workflow on forks Looks like the cancel action workflow can't run on forks due to secrets. See https://github.com/andymckay/cancel-action/issues/4 * fixup: remove cancel-workflow * fixup! fixup! fixup!: use apk for lint scripts * fixup! fixup! fixup!: use apk for lint scripts * fixup!: fix yarn key * fixup!: add fetch-depth 0
2022-09-23 03:33:32 +08:00
with:
files: |
**/*.ts
**/*.js
files_ignore: |
lib/vscode/**
- name: Install Node.js
feat(ci): refactor build workflow (#5572) * refactor: remove stylelint * refactor: move shellcheck to separate job * refactor: add helm script and job * refactor: add eslint job and yarn script * fix(test/tsconfig): exclude test-plugin * refactor: delete lint, add typecheck job * refactor: remove prebuild * wip: add notes about unit test refactor * refactor: delete buggy socket test This test was really added to in get cover specific lines but it's buggy and only passes sometimes locally. I think it's okay to remove because: - it's an implementation detail (not user facing) - not preventing any specific regressions * refactor: move test-plugin to integration suite This seems more appropriate given this tests how a plugin might work within code-server. * wip * wip: refactor vscode integration tests * refactor: move unit tests to separate job * fix: formatting * Revert "wip: refactor vscode integration tests" This reverts commit 13286bf4c9762b7d6c6176464d94b1fc316fb568. * Revert "refactor: move unit tests to separate job" This reverts commit 6c87b540b49c8d56266c8925c4fd32ed760b23bf. * feat: collect codecov integration tests * fixup! feat: collect codecov integration tests * fixup! feat: collect codecov integration tests * fixup!: move helm step * fixup!: update ids for caching * trigger ci * trigger ci * chore: clean up names in security.yaml * fixup!: remove .tsx * fixup!: change to src/**" * fixup!: move helm cmd to yaml * fixup!: always build test plugin * fixup!: fix plugin typings * fixup! add back flakey test * fixup!: only install helm deps if changes * fixup!: revert node mod caching * dont keep, test for asher * fixup!: add make to centos * refactor: add test:native This adds a new script to run native tests (i.e. --help which should run in ci on all platforms). * try updating glibc * try 2.25 * Revert "refactor: move test-plugin to integration suite" This reverts commit bc02005dc097a10b5216b616ff0bd7a911240748. I couldn't get past some GLIBC errors in CI so moving back to unit tests. * Revert "try updating glibc" This reverts commit 02ed560f223a8505cb5e6e2014055cb256a407b0. * fixup! * asher: again * try this for ts changes * fixup * refactor: scripts.yml -> scripts.yaml * fixup!: move lint-sh to scripts.yaml * fixup!: use apk for lint scripts * fixup! fixup!: use apk for lint scripts * fixup!: remove typecheck step * fix: pattern for lint ts files * test: lint should fail * fixup! fixup!: use apk for lint scripts * Revert "test: lint should fail" This reverts commit 158c64db044c24f2f8ffd082cc769f06876d6957. * fixup!: skip cancel workflow on forks Looks like the cancel action workflow can't run on forks due to secrets. See https://github.com/andymckay/cancel-action/issues/4 * fixup: remove cancel-workflow * fixup! fixup! fixup!: use apk for lint scripts * fixup! fixup! fixup!: use apk for lint scripts * fixup!: fix yarn key * fixup!: add fetch-depth 0
2022-09-23 03:33:32 +08:00
if: steps.changed-files.outputs.any_changed == 'true'
uses: actions/setup-node@v4
feat(ci): refactor build workflow (#5572) * refactor: remove stylelint * refactor: move shellcheck to separate job * refactor: add helm script and job * refactor: add eslint job and yarn script * fix(test/tsconfig): exclude test-plugin * refactor: delete lint, add typecheck job * refactor: remove prebuild * wip: add notes about unit test refactor * refactor: delete buggy socket test This test was really added to in get cover specific lines but it's buggy and only passes sometimes locally. I think it's okay to remove because: - it's an implementation detail (not user facing) - not preventing any specific regressions * refactor: move test-plugin to integration suite This seems more appropriate given this tests how a plugin might work within code-server. * wip * wip: refactor vscode integration tests * refactor: move unit tests to separate job * fix: formatting * Revert "wip: refactor vscode integration tests" This reverts commit 13286bf4c9762b7d6c6176464d94b1fc316fb568. * Revert "refactor: move unit tests to separate job" This reverts commit 6c87b540b49c8d56266c8925c4fd32ed760b23bf. * feat: collect codecov integration tests * fixup! feat: collect codecov integration tests * fixup! feat: collect codecov integration tests * fixup!: move helm step * fixup!: update ids for caching * trigger ci * trigger ci * chore: clean up names in security.yaml * fixup!: remove .tsx * fixup!: change to src/**" * fixup!: move helm cmd to yaml * fixup!: always build test plugin * fixup!: fix plugin typings * fixup! add back flakey test * fixup!: only install helm deps if changes * fixup!: revert node mod caching * dont keep, test for asher * fixup!: add make to centos * refactor: add test:native This adds a new script to run native tests (i.e. --help which should run in ci on all platforms). * try updating glibc * try 2.25 * Revert "refactor: move test-plugin to integration suite" This reverts commit bc02005dc097a10b5216b616ff0bd7a911240748. I couldn't get past some GLIBC errors in CI so moving back to unit tests. * Revert "try updating glibc" This reverts commit 02ed560f223a8505cb5e6e2014055cb256a407b0. * fixup! * asher: again * try this for ts changes * fixup * refactor: scripts.yml -> scripts.yaml * fixup!: move lint-sh to scripts.yaml * fixup!: use apk for lint scripts * fixup! fixup!: use apk for lint scripts * fixup!: remove typecheck step * fix: pattern for lint ts files * test: lint should fail * fixup! fixup!: use apk for lint scripts * Revert "test: lint should fail" This reverts commit 158c64db044c24f2f8ffd082cc769f06876d6957. * fixup!: skip cancel workflow on forks Looks like the cancel action workflow can't run on forks due to secrets. See https://github.com/andymckay/cancel-action/issues/4 * fixup: remove cancel-workflow * fixup! fixup! fixup!: use apk for lint scripts * fixup! fixup! fixup!: use apk for lint scripts * fixup!: fix yarn key * fixup!: add fetch-depth 0
2022-09-23 03:33:32 +08:00
with:
node-version-file: .node-version
cache: npm
cache-dependency-path: |
package-lock.json
test/package-lock.json
feat(ci): refactor build workflow (#5572) * refactor: remove stylelint * refactor: move shellcheck to separate job * refactor: add helm script and job * refactor: add eslint job and yarn script * fix(test/tsconfig): exclude test-plugin * refactor: delete lint, add typecheck job * refactor: remove prebuild * wip: add notes about unit test refactor * refactor: delete buggy socket test This test was really added to in get cover specific lines but it's buggy and only passes sometimes locally. I think it's okay to remove because: - it's an implementation detail (not user facing) - not preventing any specific regressions * refactor: move test-plugin to integration suite This seems more appropriate given this tests how a plugin might work within code-server. * wip * wip: refactor vscode integration tests * refactor: move unit tests to separate job * fix: formatting * Revert "wip: refactor vscode integration tests" This reverts commit 13286bf4c9762b7d6c6176464d94b1fc316fb568. * Revert "refactor: move unit tests to separate job" This reverts commit 6c87b540b49c8d56266c8925c4fd32ed760b23bf. * feat: collect codecov integration tests * fixup! feat: collect codecov integration tests * fixup! feat: collect codecov integration tests * fixup!: move helm step * fixup!: update ids for caching * trigger ci * trigger ci * chore: clean up names in security.yaml * fixup!: remove .tsx * fixup!: change to src/**" * fixup!: move helm cmd to yaml * fixup!: always build test plugin * fixup!: fix plugin typings * fixup! add back flakey test * fixup!: only install helm deps if changes * fixup!: revert node mod caching * dont keep, test for asher * fixup!: add make to centos * refactor: add test:native This adds a new script to run native tests (i.e. --help which should run in ci on all platforms). * try updating glibc * try 2.25 * Revert "refactor: move test-plugin to integration suite" This reverts commit bc02005dc097a10b5216b616ff0bd7a911240748. I couldn't get past some GLIBC errors in CI so moving back to unit tests. * Revert "try updating glibc" This reverts commit 02ed560f223a8505cb5e6e2014055cb256a407b0. * fixup! * asher: again * try this for ts changes * fixup * refactor: scripts.yml -> scripts.yaml * fixup!: move lint-sh to scripts.yaml * fixup!: use apk for lint scripts * fixup! fixup!: use apk for lint scripts * fixup!: remove typecheck step * fix: pattern for lint ts files * test: lint should fail * fixup! fixup!: use apk for lint scripts * Revert "test: lint should fail" This reverts commit 158c64db044c24f2f8ffd082cc769f06876d6957. * fixup!: skip cancel workflow on forks Looks like the cancel action workflow can't run on forks due to secrets. See https://github.com/andymckay/cancel-action/issues/4 * fixup: remove cancel-workflow * fixup! fixup! fixup!: use apk for lint scripts * fixup! fixup! fixup!: use apk for lint scripts * fixup!: fix yarn key * fixup!: add fetch-depth 0
2022-09-23 03:33:32 +08:00
- if: steps.changed-files.outputs.any_changed == 'true'
run: SKIP_SUBMODULE_DEPS=1 npm ci
feat(ci): refactor build workflow (#5572) * refactor: remove stylelint * refactor: move shellcheck to separate job * refactor: add helm script and job * refactor: add eslint job and yarn script * fix(test/tsconfig): exclude test-plugin * refactor: delete lint, add typecheck job * refactor: remove prebuild * wip: add notes about unit test refactor * refactor: delete buggy socket test This test was really added to in get cover specific lines but it's buggy and only passes sometimes locally. I think it's okay to remove because: - it's an implementation detail (not user facing) - not preventing any specific regressions * refactor: move test-plugin to integration suite This seems more appropriate given this tests how a plugin might work within code-server. * wip * wip: refactor vscode integration tests * refactor: move unit tests to separate job * fix: formatting * Revert "wip: refactor vscode integration tests" This reverts commit 13286bf4c9762b7d6c6176464d94b1fc316fb568. * Revert "refactor: move unit tests to separate job" This reverts commit 6c87b540b49c8d56266c8925c4fd32ed760b23bf. * feat: collect codecov integration tests * fixup! feat: collect codecov integration tests * fixup! feat: collect codecov integration tests * fixup!: move helm step * fixup!: update ids for caching * trigger ci * trigger ci * chore: clean up names in security.yaml * fixup!: remove .tsx * fixup!: change to src/**" * fixup!: move helm cmd to yaml * fixup!: always build test plugin * fixup!: fix plugin typings * fixup! add back flakey test * fixup!: only install helm deps if changes * fixup!: revert node mod caching * dont keep, test for asher * fixup!: add make to centos * refactor: add test:native This adds a new script to run native tests (i.e. --help which should run in ci on all platforms). * try updating glibc * try 2.25 * Revert "refactor: move test-plugin to integration suite" This reverts commit bc02005dc097a10b5216b616ff0bd7a911240748. I couldn't get past some GLIBC errors in CI so moving back to unit tests. * Revert "try updating glibc" This reverts commit 02ed560f223a8505cb5e6e2014055cb256a407b0. * fixup! * asher: again * try this for ts changes * fixup * refactor: scripts.yml -> scripts.yaml * fixup!: move lint-sh to scripts.yaml * fixup!: use apk for lint scripts * fixup! fixup!: use apk for lint scripts * fixup!: remove typecheck step * fix: pattern for lint ts files * test: lint should fail * fixup! fixup!: use apk for lint scripts * Revert "test: lint should fail" This reverts commit 158c64db044c24f2f8ffd082cc769f06876d6957. * fixup!: skip cancel workflow on forks Looks like the cancel action workflow can't run on forks due to secrets. See https://github.com/andymckay/cancel-action/issues/4 * fixup: remove cancel-workflow * fixup! fixup! fixup!: use apk for lint scripts * fixup! fixup! fixup!: use apk for lint scripts * fixup!: fix yarn key * fixup!: add fetch-depth 0
2022-09-23 03:33:32 +08:00
- name: Lint TypeScript files
if: steps.changed-files.outputs.any_changed == 'true'
run: npm run lint:ts
lint-actions:
name: Lint GitHub Actions
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Check workflow files
run: |
bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash) 1.7.1
./actionlint -color -shellcheck= -ignore "set-output"
shell: bash
chore: upgrade Code to 1.74.1 (#5909) * chore: upgrade Code to 1.74.1 * chore: remove require in integration.diff I don't know what the impact of this is but in https://github.com/microsoft/vscode/commit/192c67db71e8c261f26e2f34c86a4791ae428b2f they removed the usage of `require` in `server.main.ts`. More details in PR: https://github.com/microsoft/vscode/pull/165831 * chore: update marketplace.diff * chore: update sha hash in webview.diff * chore: update disable-builtin-ext-update.diff If my logic is right, then this patch is now simplified thanks to this: https://github.com/microsoft/vscode/blob/1.74.1/src/vs/workbench/contrib/extensions/browser/extensionsWorkbenchService.ts#L1238 * chore: refresh proxy-uri patch * chore: refresh local-storage.diff * chore: refresh sourcemaps.diff * chore: refresh disable-downloads.diff * chore: refresh display-language.diff * chore: refresh getting-started.diff * docs: update testing notes for cli-window-open * docs: update telemetry testing instructions * fix: add GITHUB_TOKEN to build code-server job Downloading @vscode/ripgrep is failing only in CI so adding this environment variable to see if it increases the rate limit. Ref: https://github.com/microsoft/vscode-ripgrep#github-api-limit-note * refactor: use own cache key build code-server job * temp: disable vscode test * refactor: delete wrapper test * Revert "refactor: delete wrapper test" This reverts commit 3999279b73c3519c7dbb03dfc7076bf26f717e13. * refactor: move vscode tests to e2e (#5911) * wip: migrate vscode tests to e2e * feat: add codeWorkspace to global setup * refactor: only use dir in spawn when we should * wip: migrate more tests * refactor: move all vscode tests to e2e * refactor(ci): move unit to own job * fixup: add codecov to unit test step * Update test/e2e/models/CodeServer.ts * Update test/e2e/models/CodeServer.ts * docs: add note about intercept requests * refactor: rm unused clean() calls * refactor: delete duplicate test * refactor: update 'should not redirect' test * refactor: rm unused imports * refactor: rm unnecessary navigate call in test * fixup: formatting * wip: update test * refactor: modify assertion for proxy * fixup: use REVERSE_PROXY_BASE_PATH * refactor: add helper fn getMaybeProxiedPathname * fixup: formatting * fixup: rm unused import * chore: increase playwright timeout * Revert "chore: increase playwright timeout" This reverts commit a059129252216c5f5cba83e9bca3d90cf658b7be. * chore: rm timeout
2022-12-23 01:25:28 +08:00
test-unit:
name: Run unit tests
runs-on: ubuntu-22.04
chore: upgrade Code to 1.74.1 (#5909) * chore: upgrade Code to 1.74.1 * chore: remove require in integration.diff I don't know what the impact of this is but in https://github.com/microsoft/vscode/commit/192c67db71e8c261f26e2f34c86a4791ae428b2f they removed the usage of `require` in `server.main.ts`. More details in PR: https://github.com/microsoft/vscode/pull/165831 * chore: update marketplace.diff * chore: update sha hash in webview.diff * chore: update disable-builtin-ext-update.diff If my logic is right, then this patch is now simplified thanks to this: https://github.com/microsoft/vscode/blob/1.74.1/src/vs/workbench/contrib/extensions/browser/extensionsWorkbenchService.ts#L1238 * chore: refresh proxy-uri patch * chore: refresh local-storage.diff * chore: refresh sourcemaps.diff * chore: refresh disable-downloads.diff * chore: refresh display-language.diff * chore: refresh getting-started.diff * docs: update testing notes for cli-window-open * docs: update telemetry testing instructions * fix: add GITHUB_TOKEN to build code-server job Downloading @vscode/ripgrep is failing only in CI so adding this environment variable to see if it increases the rate limit. Ref: https://github.com/microsoft/vscode-ripgrep#github-api-limit-note * refactor: use own cache key build code-server job * temp: disable vscode test * refactor: delete wrapper test * Revert "refactor: delete wrapper test" This reverts commit 3999279b73c3519c7dbb03dfc7076bf26f717e13. * refactor: move vscode tests to e2e (#5911) * wip: migrate vscode tests to e2e * feat: add codeWorkspace to global setup * refactor: only use dir in spawn when we should * wip: migrate more tests * refactor: move all vscode tests to e2e * refactor(ci): move unit to own job * fixup: add codecov to unit test step * Update test/e2e/models/CodeServer.ts * Update test/e2e/models/CodeServer.ts * docs: add note about intercept requests * refactor: rm unused clean() calls * refactor: delete duplicate test * refactor: update 'should not redirect' test * refactor: rm unused imports * refactor: rm unnecessary navigate call in test * fixup: formatting * wip: update test * refactor: modify assertion for proxy * fixup: use REVERSE_PROXY_BASE_PATH * refactor: add helper fn getMaybeProxiedPathname * fixup: formatting * fixup: rm unused import * chore: increase playwright timeout * Revert "chore: increase playwright timeout" This reverts commit a059129252216c5f5cba83e9bca3d90cf658b7be. * chore: rm timeout
2022-12-23 01:25:28 +08:00
timeout-minutes: 5
steps:
- name: Checkout repo
uses: actions/checkout@v4
chore: upgrade Code to 1.74.1 (#5909) * chore: upgrade Code to 1.74.1 * chore: remove require in integration.diff I don't know what the impact of this is but in https://github.com/microsoft/vscode/commit/192c67db71e8c261f26e2f34c86a4791ae428b2f they removed the usage of `require` in `server.main.ts`. More details in PR: https://github.com/microsoft/vscode/pull/165831 * chore: update marketplace.diff * chore: update sha hash in webview.diff * chore: update disable-builtin-ext-update.diff If my logic is right, then this patch is now simplified thanks to this: https://github.com/microsoft/vscode/blob/1.74.1/src/vs/workbench/contrib/extensions/browser/extensionsWorkbenchService.ts#L1238 * chore: refresh proxy-uri patch * chore: refresh local-storage.diff * chore: refresh sourcemaps.diff * chore: refresh disable-downloads.diff * chore: refresh display-language.diff * chore: refresh getting-started.diff * docs: update testing notes for cli-window-open * docs: update telemetry testing instructions * fix: add GITHUB_TOKEN to build code-server job Downloading @vscode/ripgrep is failing only in CI so adding this environment variable to see if it increases the rate limit. Ref: https://github.com/microsoft/vscode-ripgrep#github-api-limit-note * refactor: use own cache key build code-server job * temp: disable vscode test * refactor: delete wrapper test * Revert "refactor: delete wrapper test" This reverts commit 3999279b73c3519c7dbb03dfc7076bf26f717e13. * refactor: move vscode tests to e2e (#5911) * wip: migrate vscode tests to e2e * feat: add codeWorkspace to global setup * refactor: only use dir in spawn when we should * wip: migrate more tests * refactor: move all vscode tests to e2e * refactor(ci): move unit to own job * fixup: add codecov to unit test step * Update test/e2e/models/CodeServer.ts * Update test/e2e/models/CodeServer.ts * docs: add note about intercept requests * refactor: rm unused clean() calls * refactor: delete duplicate test * refactor: update 'should not redirect' test * refactor: rm unused imports * refactor: rm unnecessary navigate call in test * fixup: formatting * wip: update test * refactor: modify assertion for proxy * fixup: use REVERSE_PROXY_BASE_PATH * refactor: add helper fn getMaybeProxiedPathname * fixup: formatting * fixup: rm unused import * chore: increase playwright timeout * Revert "chore: increase playwright timeout" This reverts commit a059129252216c5f5cba83e9bca3d90cf658b7be. * chore: rm timeout
2022-12-23 01:25:28 +08:00
with:
fetch-depth: 2
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v45
chore: upgrade Code to 1.74.1 (#5909) * chore: upgrade Code to 1.74.1 * chore: remove require in integration.diff I don't know what the impact of this is but in https://github.com/microsoft/vscode/commit/192c67db71e8c261f26e2f34c86a4791ae428b2f they removed the usage of `require` in `server.main.ts`. More details in PR: https://github.com/microsoft/vscode/pull/165831 * chore: update marketplace.diff * chore: update sha hash in webview.diff * chore: update disable-builtin-ext-update.diff If my logic is right, then this patch is now simplified thanks to this: https://github.com/microsoft/vscode/blob/1.74.1/src/vs/workbench/contrib/extensions/browser/extensionsWorkbenchService.ts#L1238 * chore: refresh proxy-uri patch * chore: refresh local-storage.diff * chore: refresh sourcemaps.diff * chore: refresh disable-downloads.diff * chore: refresh display-language.diff * chore: refresh getting-started.diff * docs: update testing notes for cli-window-open * docs: update telemetry testing instructions * fix: add GITHUB_TOKEN to build code-server job Downloading @vscode/ripgrep is failing only in CI so adding this environment variable to see if it increases the rate limit. Ref: https://github.com/microsoft/vscode-ripgrep#github-api-limit-note * refactor: use own cache key build code-server job * temp: disable vscode test * refactor: delete wrapper test * Revert "refactor: delete wrapper test" This reverts commit 3999279b73c3519c7dbb03dfc7076bf26f717e13. * refactor: move vscode tests to e2e (#5911) * wip: migrate vscode tests to e2e * feat: add codeWorkspace to global setup * refactor: only use dir in spawn when we should * wip: migrate more tests * refactor: move all vscode tests to e2e * refactor(ci): move unit to own job * fixup: add codecov to unit test step * Update test/e2e/models/CodeServer.ts * Update test/e2e/models/CodeServer.ts * docs: add note about intercept requests * refactor: rm unused clean() calls * refactor: delete duplicate test * refactor: update 'should not redirect' test * refactor: rm unused imports * refactor: rm unnecessary navigate call in test * fixup: formatting * wip: update test * refactor: modify assertion for proxy * fixup: use REVERSE_PROXY_BASE_PATH * refactor: add helper fn getMaybeProxiedPathname * fixup: formatting * fixup: rm unused import * chore: increase playwright timeout * Revert "chore: increase playwright timeout" This reverts commit a059129252216c5f5cba83e9bca3d90cf658b7be. * chore: rm timeout
2022-12-23 01:25:28 +08:00
with:
files: |
**/*.ts
files_ignore: |
lib/vscode/**
- name: Install Node.js
chore: upgrade Code to 1.74.1 (#5909) * chore: upgrade Code to 1.74.1 * chore: remove require in integration.diff I don't know what the impact of this is but in https://github.com/microsoft/vscode/commit/192c67db71e8c261f26e2f34c86a4791ae428b2f they removed the usage of `require` in `server.main.ts`. More details in PR: https://github.com/microsoft/vscode/pull/165831 * chore: update marketplace.diff * chore: update sha hash in webview.diff * chore: update disable-builtin-ext-update.diff If my logic is right, then this patch is now simplified thanks to this: https://github.com/microsoft/vscode/blob/1.74.1/src/vs/workbench/contrib/extensions/browser/extensionsWorkbenchService.ts#L1238 * chore: refresh proxy-uri patch * chore: refresh local-storage.diff * chore: refresh sourcemaps.diff * chore: refresh disable-downloads.diff * chore: refresh display-language.diff * chore: refresh getting-started.diff * docs: update testing notes for cli-window-open * docs: update telemetry testing instructions * fix: add GITHUB_TOKEN to build code-server job Downloading @vscode/ripgrep is failing only in CI so adding this environment variable to see if it increases the rate limit. Ref: https://github.com/microsoft/vscode-ripgrep#github-api-limit-note * refactor: use own cache key build code-server job * temp: disable vscode test * refactor: delete wrapper test * Revert "refactor: delete wrapper test" This reverts commit 3999279b73c3519c7dbb03dfc7076bf26f717e13. * refactor: move vscode tests to e2e (#5911) * wip: migrate vscode tests to e2e * feat: add codeWorkspace to global setup * refactor: only use dir in spawn when we should * wip: migrate more tests * refactor: move all vscode tests to e2e * refactor(ci): move unit to own job * fixup: add codecov to unit test step * Update test/e2e/models/CodeServer.ts * Update test/e2e/models/CodeServer.ts * docs: add note about intercept requests * refactor: rm unused clean() calls * refactor: delete duplicate test * refactor: update 'should not redirect' test * refactor: rm unused imports * refactor: rm unnecessary navigate call in test * fixup: formatting * wip: update test * refactor: modify assertion for proxy * fixup: use REVERSE_PROXY_BASE_PATH * refactor: add helper fn getMaybeProxiedPathname * fixup: formatting * fixup: rm unused import * chore: increase playwright timeout * Revert "chore: increase playwright timeout" This reverts commit a059129252216c5f5cba83e9bca3d90cf658b7be. * chore: rm timeout
2022-12-23 01:25:28 +08:00
if: steps.changed-files.outputs.any_changed == 'true'
uses: actions/setup-node@v4
chore: upgrade Code to 1.74.1 (#5909) * chore: upgrade Code to 1.74.1 * chore: remove require in integration.diff I don't know what the impact of this is but in https://github.com/microsoft/vscode/commit/192c67db71e8c261f26e2f34c86a4791ae428b2f they removed the usage of `require` in `server.main.ts`. More details in PR: https://github.com/microsoft/vscode/pull/165831 * chore: update marketplace.diff * chore: update sha hash in webview.diff * chore: update disable-builtin-ext-update.diff If my logic is right, then this patch is now simplified thanks to this: https://github.com/microsoft/vscode/blob/1.74.1/src/vs/workbench/contrib/extensions/browser/extensionsWorkbenchService.ts#L1238 * chore: refresh proxy-uri patch * chore: refresh local-storage.diff * chore: refresh sourcemaps.diff * chore: refresh disable-downloads.diff * chore: refresh display-language.diff * chore: refresh getting-started.diff * docs: update testing notes for cli-window-open * docs: update telemetry testing instructions * fix: add GITHUB_TOKEN to build code-server job Downloading @vscode/ripgrep is failing only in CI so adding this environment variable to see if it increases the rate limit. Ref: https://github.com/microsoft/vscode-ripgrep#github-api-limit-note * refactor: use own cache key build code-server job * temp: disable vscode test * refactor: delete wrapper test * Revert "refactor: delete wrapper test" This reverts commit 3999279b73c3519c7dbb03dfc7076bf26f717e13. * refactor: move vscode tests to e2e (#5911) * wip: migrate vscode tests to e2e * feat: add codeWorkspace to global setup * refactor: only use dir in spawn when we should * wip: migrate more tests * refactor: move all vscode tests to e2e * refactor(ci): move unit to own job * fixup: add codecov to unit test step * Update test/e2e/models/CodeServer.ts * Update test/e2e/models/CodeServer.ts * docs: add note about intercept requests * refactor: rm unused clean() calls * refactor: delete duplicate test * refactor: update 'should not redirect' test * refactor: rm unused imports * refactor: rm unnecessary navigate call in test * fixup: formatting * wip: update test * refactor: modify assertion for proxy * fixup: use REVERSE_PROXY_BASE_PATH * refactor: add helper fn getMaybeProxiedPathname * fixup: formatting * fixup: rm unused import * chore: increase playwright timeout * Revert "chore: increase playwright timeout" This reverts commit a059129252216c5f5cba83e9bca3d90cf658b7be. * chore: rm timeout
2022-12-23 01:25:28 +08:00
with:
node-version-file: .node-version
cache: npm
cache-dependency-path: |
package-lock.json
test/package-lock.json
chore: upgrade Code to 1.74.1 (#5909) * chore: upgrade Code to 1.74.1 * chore: remove require in integration.diff I don't know what the impact of this is but in https://github.com/microsoft/vscode/commit/192c67db71e8c261f26e2f34c86a4791ae428b2f they removed the usage of `require` in `server.main.ts`. More details in PR: https://github.com/microsoft/vscode/pull/165831 * chore: update marketplace.diff * chore: update sha hash in webview.diff * chore: update disable-builtin-ext-update.diff If my logic is right, then this patch is now simplified thanks to this: https://github.com/microsoft/vscode/blob/1.74.1/src/vs/workbench/contrib/extensions/browser/extensionsWorkbenchService.ts#L1238 * chore: refresh proxy-uri patch * chore: refresh local-storage.diff * chore: refresh sourcemaps.diff * chore: refresh disable-downloads.diff * chore: refresh display-language.diff * chore: refresh getting-started.diff * docs: update testing notes for cli-window-open * docs: update telemetry testing instructions * fix: add GITHUB_TOKEN to build code-server job Downloading @vscode/ripgrep is failing only in CI so adding this environment variable to see if it increases the rate limit. Ref: https://github.com/microsoft/vscode-ripgrep#github-api-limit-note * refactor: use own cache key build code-server job * temp: disable vscode test * refactor: delete wrapper test * Revert "refactor: delete wrapper test" This reverts commit 3999279b73c3519c7dbb03dfc7076bf26f717e13. * refactor: move vscode tests to e2e (#5911) * wip: migrate vscode tests to e2e * feat: add codeWorkspace to global setup * refactor: only use dir in spawn when we should * wip: migrate more tests * refactor: move all vscode tests to e2e * refactor(ci): move unit to own job * fixup: add codecov to unit test step * Update test/e2e/models/CodeServer.ts * Update test/e2e/models/CodeServer.ts * docs: add note about intercept requests * refactor: rm unused clean() calls * refactor: delete duplicate test * refactor: update 'should not redirect' test * refactor: rm unused imports * refactor: rm unnecessary navigate call in test * fixup: formatting * wip: update test * refactor: modify assertion for proxy * fixup: use REVERSE_PROXY_BASE_PATH * refactor: add helper fn getMaybeProxiedPathname * fixup: formatting * fixup: rm unused import * chore: increase playwright timeout * Revert "chore: increase playwright timeout" This reverts commit a059129252216c5f5cba83e9bca3d90cf658b7be. * chore: rm timeout
2022-12-23 01:25:28 +08:00
- if: steps.changed-files.outputs.any_changed == 'true'
run: SKIP_SUBMODULE_DEPS=1 npm ci
chore: upgrade Code to 1.74.1 (#5909) * chore: upgrade Code to 1.74.1 * chore: remove require in integration.diff I don't know what the impact of this is but in https://github.com/microsoft/vscode/commit/192c67db71e8c261f26e2f34c86a4791ae428b2f they removed the usage of `require` in `server.main.ts`. More details in PR: https://github.com/microsoft/vscode/pull/165831 * chore: update marketplace.diff * chore: update sha hash in webview.diff * chore: update disable-builtin-ext-update.diff If my logic is right, then this patch is now simplified thanks to this: https://github.com/microsoft/vscode/blob/1.74.1/src/vs/workbench/contrib/extensions/browser/extensionsWorkbenchService.ts#L1238 * chore: refresh proxy-uri patch * chore: refresh local-storage.diff * chore: refresh sourcemaps.diff * chore: refresh disable-downloads.diff * chore: refresh display-language.diff * chore: refresh getting-started.diff * docs: update testing notes for cli-window-open * docs: update telemetry testing instructions * fix: add GITHUB_TOKEN to build code-server job Downloading @vscode/ripgrep is failing only in CI so adding this environment variable to see if it increases the rate limit. Ref: https://github.com/microsoft/vscode-ripgrep#github-api-limit-note * refactor: use own cache key build code-server job * temp: disable vscode test * refactor: delete wrapper test * Revert "refactor: delete wrapper test" This reverts commit 3999279b73c3519c7dbb03dfc7076bf26f717e13. * refactor: move vscode tests to e2e (#5911) * wip: migrate vscode tests to e2e * feat: add codeWorkspace to global setup * refactor: only use dir in spawn when we should * wip: migrate more tests * refactor: move all vscode tests to e2e * refactor(ci): move unit to own job * fixup: add codecov to unit test step * Update test/e2e/models/CodeServer.ts * Update test/e2e/models/CodeServer.ts * docs: add note about intercept requests * refactor: rm unused clean() calls * refactor: delete duplicate test * refactor: update 'should not redirect' test * refactor: rm unused imports * refactor: rm unnecessary navigate call in test * fixup: formatting * wip: update test * refactor: modify assertion for proxy * fixup: use REVERSE_PROXY_BASE_PATH * refactor: add helper fn getMaybeProxiedPathname * fixup: formatting * fixup: rm unused import * chore: increase playwright timeout * Revert "chore: increase playwright timeout" This reverts commit a059129252216c5f5cba83e9bca3d90cf658b7be. * chore: rm timeout
2022-12-23 01:25:28 +08:00
- if: steps.changed-files.outputs.any_changed == 'true'
run: npm run test:unit
chore: upgrade Code to 1.74.1 (#5909) * chore: upgrade Code to 1.74.1 * chore: remove require in integration.diff I don't know what the impact of this is but in https://github.com/microsoft/vscode/commit/192c67db71e8c261f26e2f34c86a4791ae428b2f they removed the usage of `require` in `server.main.ts`. More details in PR: https://github.com/microsoft/vscode/pull/165831 * chore: update marketplace.diff * chore: update sha hash in webview.diff * chore: update disable-builtin-ext-update.diff If my logic is right, then this patch is now simplified thanks to this: https://github.com/microsoft/vscode/blob/1.74.1/src/vs/workbench/contrib/extensions/browser/extensionsWorkbenchService.ts#L1238 * chore: refresh proxy-uri patch * chore: refresh local-storage.diff * chore: refresh sourcemaps.diff * chore: refresh disable-downloads.diff * chore: refresh display-language.diff * chore: refresh getting-started.diff * docs: update testing notes for cli-window-open * docs: update telemetry testing instructions * fix: add GITHUB_TOKEN to build code-server job Downloading @vscode/ripgrep is failing only in CI so adding this environment variable to see if it increases the rate limit. Ref: https://github.com/microsoft/vscode-ripgrep#github-api-limit-note * refactor: use own cache key build code-server job * temp: disable vscode test * refactor: delete wrapper test * Revert "refactor: delete wrapper test" This reverts commit 3999279b73c3519c7dbb03dfc7076bf26f717e13. * refactor: move vscode tests to e2e (#5911) * wip: migrate vscode tests to e2e * feat: add codeWorkspace to global setup * refactor: only use dir in spawn when we should * wip: migrate more tests * refactor: move all vscode tests to e2e * refactor(ci): move unit to own job * fixup: add codecov to unit test step * Update test/e2e/models/CodeServer.ts * Update test/e2e/models/CodeServer.ts * docs: add note about intercept requests * refactor: rm unused clean() calls * refactor: delete duplicate test * refactor: update 'should not redirect' test * refactor: rm unused imports * refactor: rm unnecessary navigate call in test * fixup: formatting * wip: update test * refactor: modify assertion for proxy * fixup: use REVERSE_PROXY_BASE_PATH * refactor: add helper fn getMaybeProxiedPathname * fixup: formatting * fixup: rm unused import * chore: increase playwright timeout * Revert "chore: increase playwright timeout" This reverts commit a059129252216c5f5cba83e9bca3d90cf658b7be. * chore: rm timeout
2022-12-23 01:25:28 +08:00
- name: Upload coverage report to Codecov
uses: codecov/codecov-action@v4
chore: upgrade Code to 1.74.1 (#5909) * chore: upgrade Code to 1.74.1 * chore: remove require in integration.diff I don't know what the impact of this is but in https://github.com/microsoft/vscode/commit/192c67db71e8c261f26e2f34c86a4791ae428b2f they removed the usage of `require` in `server.main.ts`. More details in PR: https://github.com/microsoft/vscode/pull/165831 * chore: update marketplace.diff * chore: update sha hash in webview.diff * chore: update disable-builtin-ext-update.diff If my logic is right, then this patch is now simplified thanks to this: https://github.com/microsoft/vscode/blob/1.74.1/src/vs/workbench/contrib/extensions/browser/extensionsWorkbenchService.ts#L1238 * chore: refresh proxy-uri patch * chore: refresh local-storage.diff * chore: refresh sourcemaps.diff * chore: refresh disable-downloads.diff * chore: refresh display-language.diff * chore: refresh getting-started.diff * docs: update testing notes for cli-window-open * docs: update telemetry testing instructions * fix: add GITHUB_TOKEN to build code-server job Downloading @vscode/ripgrep is failing only in CI so adding this environment variable to see if it increases the rate limit. Ref: https://github.com/microsoft/vscode-ripgrep#github-api-limit-note * refactor: use own cache key build code-server job * temp: disable vscode test * refactor: delete wrapper test * Revert "refactor: delete wrapper test" This reverts commit 3999279b73c3519c7dbb03dfc7076bf26f717e13. * refactor: move vscode tests to e2e (#5911) * wip: migrate vscode tests to e2e * feat: add codeWorkspace to global setup * refactor: only use dir in spawn when we should * wip: migrate more tests * refactor: move all vscode tests to e2e * refactor(ci): move unit to own job * fixup: add codecov to unit test step * Update test/e2e/models/CodeServer.ts * Update test/e2e/models/CodeServer.ts * docs: add note about intercept requests * refactor: rm unused clean() calls * refactor: delete duplicate test * refactor: update 'should not redirect' test * refactor: rm unused imports * refactor: rm unnecessary navigate call in test * fixup: formatting * wip: update test * refactor: modify assertion for proxy * fixup: use REVERSE_PROXY_BASE_PATH * refactor: add helper fn getMaybeProxiedPathname * fixup: formatting * fixup: rm unused import * chore: increase playwright timeout * Revert "chore: increase playwright timeout" This reverts commit a059129252216c5f5cba83e9bca3d90cf658b7be. * chore: rm timeout
2022-12-23 01:25:28 +08:00
with:
token: ${{ secrets.CODECOV_TOKEN }}
if: success()
build:
name: Build code-server
runs-on: ubuntu-22.04
timeout-minutes: 60
fix(testing): revert change & fix playwright tests (#4310) * fix(testing): revert change & fix playwright tests * fix(constants): add type to import statement * refactor(e2e): delete browser test This test was originally added to ensure playwright was working. At this point, we know it works so removing this test because it doesn't help with anything specific to code-server and only adds unnecessary code to the codebase plus increases the e2e test job duration. * chore(e2e): use 1 worker for e2e test I don't know if it's a resources issue, playwright, or code-server but it seems like the e2e tests choke when multiple workers are used. This change is okay because our CI runner only has 2 cores so it would only use 1 worker anyway, but by specifying it in our playwright config, we ensure more stability in our e2e tests working correctly. See these PRs: - https://github.com/cdr/code-server/pull/3263 - https://github.com/cdr/code-server/pull/4310 * revert(vscode): add missing route with redirect * chore(vscode): update to latest fork * Touch up compilation step. * Bump vendor. * Fix VS Code minification step * Move ClientConfiguration to common Common code must not import Node code as it is imported by the browser. * Ensure lib directory exists before curling cURL errors now because VS Code was moved and the directory does not exist. * Update incorrect e2e test help output Revert workers change as well; this can be overridden when desired. * Add back extension compilation step * Include missing resources in release This includes a favicon, for example. I opted to include the entire directory to make sure we do not miss anything. Some of the other stuff looks potentially useful (like completions). * Set quality property in product configuration When httpWebWorkerExtensionHostIframe.html is fetched it uses the web endpoint template (in which we do not include the commit) but if the quality is not set it prepends the commit to the web endpoint instead. The new static endpoint does not use/handle commits so this 404s. Long-term we might want to make the new static endpoint use commits like the old one but we will also need to update the various other static URLs to include the commit. For now I just fixed this by adding the quality since: 1. Probably faster than trying to find and update all static uses. 2. VS Code probably expects it anyway. 3. Gives us better control over the endpoint. * Update VS Code This fixes several build issues. * Bump vscode. * Bump. * Bump. * Use CLI directly. * Update tests to reflect new upstream behavior. * Move unit tests to after the build Our code has new dependencies on VS Code that are pulled in when the unit tests run. Because of this we need to build VS Code before running the unit tests (as it only pulls built code). * Upgrade proxy-agent dependencies This resolves a security report with one of its dependencies (vm2). * Symlink VS Code output directory before unit tests This is necessary now that we import from the out directory. * Fix issues surrounding persistent processes between tests. * Update VS Code cache directories These were renamed so the cached paths need to be updated. I changed the key as well to force a rebuild. * Move test symlink to script This way it works for local testing as well. I had to use out-build instead of out-vscode-server-min because Jest throws some obscure error about a handlebars haste map. * Fix listening on a socket * Update VS Code It contains fixes for missing files in the build. * Standardize disposals * Dispose HTTP server Shares code with the test HTTP server. For now it is a function but maybe we should make it a class that is extended by tests. * Dispose app on exit * Fix logging link errors Unfortunately the logger currently chokes when provided with error objects. Also for some reason the bracketed text was not displaying... * Update regex used by e2e to extract address The address was recently changed to use URL which seems to add a trailing slash when using toString, causing the regex match to fail. * Log browser console in e2e tests * Add base back to login page This is used to set cookies when using a base path. * Remove login page test The file this was testing no longer exists. * Use path.posix for static base Since this is a web path and not platform-dependent. * Add test for invalid password Co-authored-by: Teffen Ellis <teffen@nirri.us> Co-authored-by: Asher <ash@coder.com>
2021-10-29 04:27:17 +08:00
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
DISABLE_V8_COMPILE_CACHE: 1
2020-05-07 12:06:55 +08:00
steps:
- name: Checkout repo
uses: actions/checkout@v4
2020-05-08 08:44:32 +08:00
with:
submodules: true
- name: Install system dependencies
run: sudo apt update && sudo apt install -y libkrb5-dev
- name: Install quilt
uses: awalsh128/cache-apt-pkgs-action@latest
with:
packages: quilt
version: 1.0
- name: Patch Code
run: quilt push -a
- name: Install Node.js
uses: actions/setup-node@v4
2021-02-03 05:29:02 +08:00
with:
node-version-file: .node-version
cache: npm
cache-dependency-path: |
package-lock.json
test/package-lock.json
2020-05-08 08:44:32 +08:00
- run: SKIP_SUBMODULE_DEPS=1 npm ci
- env:
chore: upgrade Code to 1.74.1 (#5909) * chore: upgrade Code to 1.74.1 * chore: remove require in integration.diff I don't know what the impact of this is but in https://github.com/microsoft/vscode/commit/192c67db71e8c261f26e2f34c86a4791ae428b2f they removed the usage of `require` in `server.main.ts`. More details in PR: https://github.com/microsoft/vscode/pull/165831 * chore: update marketplace.diff * chore: update sha hash in webview.diff * chore: update disable-builtin-ext-update.diff If my logic is right, then this patch is now simplified thanks to this: https://github.com/microsoft/vscode/blob/1.74.1/src/vs/workbench/contrib/extensions/browser/extensionsWorkbenchService.ts#L1238 * chore: refresh proxy-uri patch * chore: refresh local-storage.diff * chore: refresh sourcemaps.diff * chore: refresh disable-downloads.diff * chore: refresh display-language.diff * chore: refresh getting-started.diff * docs: update testing notes for cli-window-open * docs: update telemetry testing instructions * fix: add GITHUB_TOKEN to build code-server job Downloading @vscode/ripgrep is failing only in CI so adding this environment variable to see if it increases the rate limit. Ref: https://github.com/microsoft/vscode-ripgrep#github-api-limit-note * refactor: use own cache key build code-server job * temp: disable vscode test * refactor: delete wrapper test * Revert "refactor: delete wrapper test" This reverts commit 3999279b73c3519c7dbb03dfc7076bf26f717e13. * refactor: move vscode tests to e2e (#5911) * wip: migrate vscode tests to e2e * feat: add codeWorkspace to global setup * refactor: only use dir in spawn when we should * wip: migrate more tests * refactor: move all vscode tests to e2e * refactor(ci): move unit to own job * fixup: add codecov to unit test step * Update test/e2e/models/CodeServer.ts * Update test/e2e/models/CodeServer.ts * docs: add note about intercept requests * refactor: rm unused clean() calls * refactor: delete duplicate test * refactor: update 'should not redirect' test * refactor: rm unused imports * refactor: rm unnecessary navigate call in test * fixup: formatting * wip: update test * refactor: modify assertion for proxy * fixup: use REVERSE_PROXY_BASE_PATH * refactor: add helper fn getMaybeProxiedPathname * fixup: formatting * fixup: rm unused import * chore: increase playwright timeout * Revert "chore: increase playwright timeout" This reverts commit a059129252216c5f5cba83e9bca3d90cf658b7be. * chore: rm timeout
2022-12-23 01:25:28 +08:00
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: npm run build
# Get Code's git hash. When this changes it means the content is
# different and we need to rebuild.
- name: Get latest lib/vscode rev
id: vscode-rev
run: echo "rev=$(git rev-parse HEAD:./lib/vscode)" >> $GITHUB_OUTPUT
# We need to rebuild when we have a new version of Code, when any of
# the patches changed, or when the code-server version changes (since
# it gets embedded into the code). Use VSCODE_CACHE_VERSION to
# force a rebuild.
- name: Fetch prebuilt Code package from cache
id: cache-vscode
uses: actions/cache@v4
2020-05-08 08:44:32 +08:00
with:
path: lib/vscode-reh-web-*
key: vscode-reh-package-${{ secrets.VSCODE_CACHE_VERSION }}-${{ steps.vscode-rev.outputs.rev }}-${{ hashFiles('patches/*.diff', 'ci/build/build-vscode.sh') }}
- name: Build vscode
env:
VERSION: "0.0.0"
if: steps.cache-vscode.outputs.cache-hit != 'true'
run: |
pushd lib/vscode
npm ci
popd
npm run build:vscode
# The release package does not contain any native modules
# and is neutral to architecture/os/libc version.
- run: npm run release
if: success()
# https://github.com/actions/upload-artifact/issues/38
- run: tar -czf package.tar.gz release
2020-05-08 08:44:32 +08:00
- name: Upload npm package artifact
uses: actions/upload-artifact@v4
2020-05-08 08:44:32 +08:00
with:
name: npm-package
path: ./package.tar.gz
2020-05-08 08:44:32 +08:00
test-e2e:
name: Run e2e tests
needs: build
runs-on: ubuntu-22.04
timeout-minutes: 25
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Install system dependencies
run: sudo apt update && sudo apt install -y libkrb5-dev
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version-file: .node-version
cache: npm
cache-dependency-path: |
package-lock.json
test/package-lock.json
- run: SKIP_SUBMODULE_DEPS=1 npm ci
- name: Download npm package
uses: actions/download-artifact@v4
with:
name: npm-package
- run: tar -xzf package.tar.gz
- run: cd release && npm install --unsafe-perm --omit=dev
- name: Install Playwright OS dependencies
run: |
./test/node_modules/.bin/playwright install-deps
./test/node_modules/.bin/playwright install
- run: CODE_SERVER_TEST_ENTRY=./release npm run test:e2e
- name: Upload test artifacts
if: always()
uses: actions/upload-artifact@v4
with:
2021-04-15 03:03:47 +08:00
name: failed-test-videos
path: ./test/test-results
- name: Remove release packages and test artifacts
run: rm -rf ./release ./test/test-results
test-e2e-proxy:
name: Run e2e tests behind proxy
needs: build
runs-on: ubuntu-22.04
timeout-minutes: 25
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Install system dependencies
run: sudo apt update && sudo apt install -y libkrb5-dev
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version-file: .node-version
cache: npm
cache-dependency-path: |
package-lock.json
test/package-lock.json
- run: SKIP_SUBMODULE_DEPS=1 npm ci
- name: Download npm package
uses: actions/download-artifact@v4
with:
name: npm-package
- run: tar -xzf package.tar.gz
- run: cd release && npm install --unsafe-perm --omit=dev
- name: Install Playwright OS dependencies
run: |
./test/node_modules/.bin/playwright install-deps
./test/node_modules/.bin/playwright install
- name: Cache Caddy
uses: actions/cache@v4
id: caddy-cache
with:
path: |
~/.cache/caddy
key: cache-caddy-2.5.2
- name: Install Caddy
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
if: steps.caddy-cache.outputs.cache-hit != 'true'
run: |
gh release download v2.5.2 --repo caddyserver/caddy --pattern "caddy_2.5.2_linux_amd64.tar.gz"
mkdir -p ~/.cache/caddy
tar -xzf caddy_2.5.2_linux_amd64.tar.gz --directory ~/.cache/caddy
- run: sudo ~/.cache/caddy/caddy start --config ./ci/Caddyfile
- run: CODE_SERVER_TEST_ENTRY=./release npm run test:e2e:proxy
- if: always()
run: sudo ~/.cache/caddy/caddy stop --config ./ci/Caddyfile
- if: always()
uses: actions/upload-artifact@v4
with:
name: failed-test-videos-proxy
path: ./test/test-results