2021-07-03 02:18:37 +08:00
|
|
|
name: Build
|
2020-05-07 12:06:55 +08:00
|
|
|
|
2021-03-13 01:48:39 +08:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- main
|
|
|
|
pull_request:
|
|
|
|
branches:
|
|
|
|
- main
|
2020-05-07 12:06:55 +08:00
|
|
|
|
2022-03-02 07:03:39 +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' }}
|
|
|
|
|
2021-04-09 02:12:01 +08:00
|
|
|
# Note: if: success() is used in several jobs -
|
|
|
|
# this ensures that it only executes if all previous jobs succeeded.
|
|
|
|
|
2022-09-20 00:56:34 +08:00
|
|
|
# if: steps.cache-node-modules.outputs.cache-hit != 'true'
|
2024-10-18 12:31:28 +08:00
|
|
|
# will skip running `npm install` if it successfully fetched from cache
|
2021-04-09 02:12:01 +08:00
|
|
|
|
2020-05-07 12:06:55 +08:00
|
|
|
jobs:
|
2022-10-14 06:16:55 +08:00
|
|
|
prettier:
|
2022-09-23 03:33:32 +08:00
|
|
|
name: Format with Prettier
|
2024-11-02 04:32:25 +08:00
|
|
|
runs-on: ubuntu-22.04
|
2022-09-23 03:33:32 +08:00
|
|
|
timeout-minutes: 5
|
2020-05-13 07:33:34 +08:00
|
|
|
steps:
|
2021-04-09 02:12:01 +08:00
|
|
|
- name: Checkout repo
|
2023-10-05 07:50:11 +08:00
|
|
|
uses: actions/checkout@v4
|
2021-04-09 02:12:01 +08:00
|
|
|
|
2022-10-14 06:16:55 +08:00
|
|
|
- name: Run prettier with actionsx/prettier
|
2023-09-22 08:13:34 +08:00
|
|
|
uses: actionsx/prettier@v3
|
2022-10-14 06:16:55 +08:00
|
|
|
with:
|
2024-10-18 12:31:28 +08:00
|
|
|
args: --check --log-level=warn .
|
2022-10-14 06:16:55 +08:00
|
|
|
|
|
|
|
doctoc:
|
|
|
|
name: Doctoc markdown files
|
2024-11-02 04:32:25 +08:00
|
|
|
runs-on: ubuntu-22.04
|
2022-10-14 06:16:55 +08:00
|
|
|
timeout-minutes: 5
|
|
|
|
steps:
|
|
|
|
- name: Checkout repo
|
2023-10-05 07:50:11 +08:00
|
|
|
uses: actions/checkout@v4
|
2022-10-14 06:16:55 +08:00
|
|
|
|
|
|
|
- name: Get changed files
|
|
|
|
id: changed-files
|
2024-09-04 02:24:27 +08:00
|
|
|
uses: tj-actions/changed-files@v45
|
2022-10-14 06:16:55 +08:00
|
|
|
with:
|
|
|
|
files: |
|
|
|
|
docs/**
|
|
|
|
|
2023-11-15 05:45:56 +08:00
|
|
|
- name: Install Node.js
|
2022-10-14 06:16:55 +08:00
|
|
|
if: steps.changed-files.outputs.any_changed == 'true'
|
2023-11-15 02:23:05 +08:00
|
|
|
uses: actions/setup-node@v4
|
2020-05-13 07:33:34 +08:00
|
|
|
with:
|
2023-11-15 05:45:56 +08:00
|
|
|
node-version-file: .node-version
|
2024-10-18 12:31:28 +08:00
|
|
|
cache: npm
|
|
|
|
cache-dependency-path: |
|
|
|
|
package-lock.json
|
|
|
|
test/package-lock.json
|
2020-05-13 07:33:34 +08:00
|
|
|
|
2024-10-18 12:31:28 +08:00
|
|
|
- if: steps.changed-files.outputs.any_changed == 'true'
|
|
|
|
run: SKIP_SUBMODULE_DEPS=1 npm ci
|
2022-09-23 03:33:32 +08:00
|
|
|
|
2024-10-18 12:31:28 +08:00
|
|
|
- if: steps.changed-files.outputs.any_changed == 'true'
|
|
|
|
run: npm run doctoc
|
2022-09-23 03:33:32 +08:00
|
|
|
|
|
|
|
lint-helm:
|
|
|
|
name: Lint Helm chart
|
2024-11-02 04:32:25 +08:00
|
|
|
runs-on: ubuntu-22.04
|
2022-09-23 03:33:32 +08:00
|
|
|
timeout-minutes: 5
|
|
|
|
steps:
|
|
|
|
- name: Checkout repo
|
2023-10-05 07:50:11 +08:00
|
|
|
uses: actions/checkout@v4
|
2022-09-23 03:33:32 +08:00
|
|
|
with:
|
|
|
|
fetch-depth: 2
|
|
|
|
|
|
|
|
- name: Get changed files
|
|
|
|
id: changed-files
|
2024-09-04 02:24:27 +08:00
|
|
|
uses: tj-actions/changed-files@v45
|
2022-09-23 03:33:32 +08:00
|
|
|
with:
|
|
|
|
files: |
|
|
|
|
ci/helm-chart/**
|
|
|
|
|
2021-04-09 02:12:01 +08:00
|
|
|
- name: Install helm
|
2022-09-23 03:33:32 +08:00
|
|
|
if: steps.changed-files.outputs.any_changed == 'true'
|
2024-05-07 06:16:06 +08:00
|
|
|
uses: azure/setup-helm@v4
|
2022-09-20 00:56:34 +08:00
|
|
|
with:
|
|
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
|
2024-10-18 12:31:28 +08:00
|
|
|
- if: steps.changed-files.outputs.any_changed == 'true'
|
2022-09-20 00:56:34 +08:00
|
|
|
run: helm plugin install https://github.com/instrumenta/helm-kubeval
|
2021-04-09 02:12:01 +08:00
|
|
|
|
2024-10-18 12:31:28 +08:00
|
|
|
- if: steps.changed-files.outputs.any_changed == 'true'
|
2022-09-23 03:33:32 +08:00
|
|
|
run: helm kubeval ci/helm-chart
|
|
|
|
|
|
|
|
lint-ts:
|
|
|
|
name: Lint TypeScript files
|
2024-11-02 04:32:25 +08:00
|
|
|
runs-on: ubuntu-22.04
|
2022-09-23 03:33:32 +08:00
|
|
|
timeout-minutes: 5
|
|
|
|
steps:
|
|
|
|
- name: Checkout repo
|
2023-10-05 07:50:11 +08:00
|
|
|
uses: actions/checkout@v4
|
2022-09-23 03:33:32 +08:00
|
|
|
with:
|
|
|
|
fetch-depth: 2
|
|
|
|
|
|
|
|
- name: Get changed files
|
|
|
|
id: changed-files
|
2024-09-04 02:24:27 +08:00
|
|
|
uses: tj-actions/changed-files@v45
|
2022-09-23 03:33:32 +08:00
|
|
|
with:
|
|
|
|
files: |
|
|
|
|
**/*.ts
|
|
|
|
**/*.js
|
|
|
|
files_ignore: |
|
|
|
|
lib/vscode/**
|
|
|
|
|
2023-11-15 05:45:56 +08:00
|
|
|
- name: Install Node.js
|
2022-09-23 03:33:32 +08:00
|
|
|
if: steps.changed-files.outputs.any_changed == 'true'
|
2023-11-15 02:23:05 +08:00
|
|
|
uses: actions/setup-node@v4
|
2022-09-23 03:33:32 +08:00
|
|
|
with:
|
2023-11-15 05:45:56 +08:00
|
|
|
node-version-file: .node-version
|
2024-10-18 12:31:28 +08:00
|
|
|
cache: npm
|
|
|
|
cache-dependency-path: |
|
|
|
|
package-lock.json
|
|
|
|
test/package-lock.json
|
2022-09-23 03:33:32 +08:00
|
|
|
|
2024-10-18 12:31:28 +08:00
|
|
|
- if: steps.changed-files.outputs.any_changed == 'true'
|
|
|
|
run: SKIP_SUBMODULE_DEPS=1 npm ci
|
2020-05-13 07:33:34 +08:00
|
|
|
|
2022-09-23 03:33:32 +08:00
|
|
|
- name: Lint TypeScript files
|
|
|
|
if: steps.changed-files.outputs.any_changed == 'true'
|
2024-10-18 12:31:28 +08:00
|
|
|
run: npm run lint:ts
|
2021-04-09 02:12:01 +08:00
|
|
|
|
2023-01-14 01:21:56 +08:00
|
|
|
lint-actions:
|
|
|
|
name: Lint GitHub Actions
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout repo
|
2023-10-05 07:50:11 +08:00
|
|
|
uses: actions/checkout@v4
|
2023-01-14 01:21:56 +08:00
|
|
|
- name: Check workflow files
|
|
|
|
run: |
|
2024-07-11 02:39:03 +08:00
|
|
|
bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash) 1.7.1
|
2023-01-14 01:21:56 +08:00
|
|
|
./actionlint -color -shellcheck= -ignore "set-output"
|
|
|
|
shell: bash
|
|
|
|
|
2022-12-23 01:25:28 +08:00
|
|
|
test-unit:
|
|
|
|
name: Run unit tests
|
2024-11-02 04:32:25 +08:00
|
|
|
runs-on: ubuntu-22.04
|
2022-12-23 01:25:28 +08:00
|
|
|
timeout-minutes: 5
|
|
|
|
steps:
|
|
|
|
- name: Checkout repo
|
2023-10-05 07:50:11 +08:00
|
|
|
uses: actions/checkout@v4
|
2022-12-23 01:25:28 +08:00
|
|
|
with:
|
|
|
|
fetch-depth: 2
|
|
|
|
|
|
|
|
- name: Get changed files
|
|
|
|
id: changed-files
|
2024-09-04 02:24:27 +08:00
|
|
|
uses: tj-actions/changed-files@v45
|
2022-12-23 01:25:28 +08:00
|
|
|
with:
|
|
|
|
files: |
|
|
|
|
**/*.ts
|
|
|
|
files_ignore: |
|
|
|
|
lib/vscode/**
|
|
|
|
|
2023-11-15 05:45:56 +08:00
|
|
|
- name: Install Node.js
|
2022-12-23 01:25:28 +08:00
|
|
|
if: steps.changed-files.outputs.any_changed == 'true'
|
2023-11-15 02:23:05 +08:00
|
|
|
uses: actions/setup-node@v4
|
2022-12-23 01:25:28 +08:00
|
|
|
with:
|
2023-11-15 05:45:56 +08:00
|
|
|
node-version-file: .node-version
|
2024-10-18 12:31:28 +08:00
|
|
|
cache: npm
|
|
|
|
cache-dependency-path: |
|
|
|
|
package-lock.json
|
|
|
|
test/package-lock.json
|
2022-12-23 01:25:28 +08:00
|
|
|
|
2024-10-18 12:31:28 +08:00
|
|
|
- if: steps.changed-files.outputs.any_changed == 'true'
|
|
|
|
run: SKIP_SUBMODULE_DEPS=1 npm ci
|
2022-12-23 01:25:28 +08:00
|
|
|
|
2024-10-18 12:31:28 +08:00
|
|
|
- if: steps.changed-files.outputs.any_changed == 'true'
|
|
|
|
run: npm run test:unit
|
2022-12-23 01:25:28 +08:00
|
|
|
|
|
|
|
- name: Upload coverage report to Codecov
|
2024-03-08 03:15:42 +08:00
|
|
|
uses: codecov/codecov-action@v4
|
2022-12-23 01:25:28 +08:00
|
|
|
with:
|
|
|
|
token: ${{ secrets.CODECOV_TOKEN }}
|
|
|
|
if: success()
|
|
|
|
|
2021-04-09 02:12:01 +08:00
|
|
|
build:
|
2022-09-28 02:46:37 +08:00
|
|
|
name: Build code-server
|
2024-11-02 04:32:25 +08:00
|
|
|
runs-on: ubuntu-22.04
|
2023-07-20 06:00:31 +08:00
|
|
|
timeout-minutes: 60
|
2021-10-29 04:27:17 +08:00
|
|
|
env:
|
|
|
|
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
2024-06-09 12:07:24 +08:00
|
|
|
DISABLE_V8_COMPILE_CACHE: 1
|
2020-05-07 12:06:55 +08:00
|
|
|
steps:
|
2022-03-15 10:37:29 +08:00
|
|
|
- name: Checkout repo
|
2023-10-05 07:50:11 +08:00
|
|
|
uses: actions/checkout@v4
|
2020-05-08 08:44:32 +08:00
|
|
|
with:
|
2022-03-15 10:37:29 +08:00
|
|
|
submodules: true
|
2021-04-09 02:12:01 +08:00
|
|
|
|
2023-09-21 07:33:28 +08:00
|
|
|
- name: Install system dependencies
|
|
|
|
run: sudo apt update && sudo apt install -y libkrb5-dev
|
|
|
|
|
2022-03-23 04:07:14 +08:00
|
|
|
- name: Install quilt
|
2022-09-20 00:56:34 +08:00
|
|
|
uses: awalsh128/cache-apt-pkgs-action@latest
|
|
|
|
with:
|
|
|
|
packages: quilt
|
|
|
|
version: 1.0
|
2022-03-23 04:07:14 +08:00
|
|
|
|
|
|
|
- name: Patch Code
|
|
|
|
run: quilt push -a
|
|
|
|
|
2023-11-15 05:45:56 +08:00
|
|
|
- name: Install Node.js
|
2023-11-15 02:23:05 +08:00
|
|
|
uses: actions/setup-node@v4
|
2021-02-03 05:29:02 +08:00
|
|
|
with:
|
2023-11-15 05:45:56 +08:00
|
|
|
node-version-file: .node-version
|
2024-10-18 12:31:28 +08:00
|
|
|
cache: npm
|
|
|
|
cache-dependency-path: |
|
|
|
|
package-lock.json
|
|
|
|
test/package-lock.json
|
2020-05-08 08:44:32 +08:00
|
|
|
|
2024-10-18 12:31:28 +08:00
|
|
|
- run: SKIP_SUBMODULE_DEPS=1 npm ci
|
2021-04-09 02:12:01 +08:00
|
|
|
|
2024-10-18 12:31:28 +08:00
|
|
|
- env:
|
2022-12-23 01:25:28 +08:00
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
2024-10-18 12:31:28 +08:00
|
|
|
run: npm run build
|
2021-04-09 02:12:01 +08:00
|
|
|
|
2022-03-15 10:37:29 +08:00
|
|
|
# Get Code's git hash. When this changes it means the content is
|
2022-03-23 04:07:14 +08:00
|
|
|
# different and we need to rebuild.
|
2022-03-15 10:37:29 +08:00
|
|
|
- name: Get latest lib/vscode rev
|
2021-04-09 02:12:01 +08:00
|
|
|
id: vscode-rev
|
2023-03-15 04:52:53 +08:00
|
|
|
run: echo "rev=$(git rev-parse HEAD:./lib/vscode)" >> $GITHUB_OUTPUT
|
2021-04-09 02:12:01 +08:00
|
|
|
|
2022-07-20 03:34:01 +08:00
|
|
|
# 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.
|
2022-03-23 04:07:14 +08:00
|
|
|
- name: Fetch prebuilt Code package from cache
|
|
|
|
id: cache-vscode
|
2024-02-02 09:38:25 +08:00
|
|
|
uses: actions/cache@v4
|
2020-05-08 08:44:32 +08:00
|
|
|
with:
|
2022-03-23 04:07:14 +08:00
|
|
|
path: lib/vscode-reh-web-*
|
2022-11-09 06:45:01 +08:00
|
|
|
key: vscode-reh-package-${{ secrets.VSCODE_CACHE_VERSION }}-${{ steps.vscode-rev.outputs.rev }}-${{ hashFiles('patches/*.diff', 'ci/build/build-vscode.sh') }}
|
2021-04-09 02:12:01 +08:00
|
|
|
|
|
|
|
- name: Build vscode
|
2022-11-09 06:45:01 +08:00
|
|
|
env:
|
|
|
|
VERSION: "0.0.0"
|
2022-03-23 04:07:14 +08:00
|
|
|
if: steps.cache-vscode.outputs.cache-hit != 'true'
|
2024-10-18 12:31:28 +08:00
|
|
|
run: |
|
|
|
|
pushd lib/vscode
|
|
|
|
npm ci
|
|
|
|
popd
|
|
|
|
npm run build:vscode
|
2021-04-09 02:12:01 +08:00
|
|
|
|
|
|
|
# The release package does not contain any native modules
|
|
|
|
# and is neutral to architecture/os/libc version.
|
2024-10-18 12:31:28 +08:00
|
|
|
- run: npm run release
|
2021-04-09 02:12:01 +08:00
|
|
|
if: success()
|
|
|
|
|
|
|
|
# https://github.com/actions/upload-artifact/issues/38
|
2024-10-18 12:31:28 +08:00
|
|
|
- run: tar -czf package.tar.gz release
|
2021-04-09 02:12:01 +08:00
|
|
|
|
2020-05-08 08:44:32 +08:00
|
|
|
- name: Upload npm package artifact
|
2024-01-06 06:32:10 +08:00
|
|
|
uses: actions/upload-artifact@v4
|
2020-05-08 08:44:32 +08:00
|
|
|
with:
|
|
|
|
name: npm-package
|
2021-04-09 02:12:01 +08:00
|
|
|
path: ./package.tar.gz
|
2020-05-08 08:44:32 +08:00
|
|
|
|
2022-09-28 02:46:37 +08:00
|
|
|
test-e2e:
|
|
|
|
name: Run e2e tests
|
2021-04-09 02:12:01 +08:00
|
|
|
needs: build
|
2024-11-02 04:32:25 +08:00
|
|
|
runs-on: ubuntu-22.04
|
2022-12-07 04:28:27 +08:00
|
|
|
timeout-minutes: 25
|
2020-05-08 11:48:49 +08:00
|
|
|
steps:
|
2022-03-15 10:37:29 +08:00
|
|
|
- name: Checkout repo
|
2023-10-05 07:50:11 +08:00
|
|
|
uses: actions/checkout@v4
|
2021-04-09 02:12:01 +08:00
|
|
|
|
2023-09-21 07:33:28 +08:00
|
|
|
- name: Install system dependencies
|
|
|
|
run: sudo apt update && sudo apt install -y libkrb5-dev
|
|
|
|
|
2023-11-15 05:45:56 +08:00
|
|
|
- name: Install Node.js
|
2023-11-15 02:23:05 +08:00
|
|
|
uses: actions/setup-node@v4
|
2021-04-09 02:12:01 +08:00
|
|
|
with:
|
2023-11-15 05:45:56 +08:00
|
|
|
node-version-file: .node-version
|
2024-10-18 12:31:28 +08:00
|
|
|
cache: npm
|
|
|
|
cache-dependency-path: |
|
|
|
|
package-lock.json
|
|
|
|
test/package-lock.json
|
2021-04-09 02:12:01 +08:00
|
|
|
|
2024-10-18 12:31:28 +08:00
|
|
|
- run: SKIP_SUBMODULE_DEPS=1 npm ci
|
2022-09-20 00:56:34 +08:00
|
|
|
|
2020-05-08 11:48:49 +08:00
|
|
|
- name: Download npm package
|
2024-01-06 06:32:33 +08:00
|
|
|
uses: actions/download-artifact@v4
|
2020-05-08 11:48:49 +08:00
|
|
|
with:
|
|
|
|
name: npm-package
|
2021-04-09 02:12:01 +08:00
|
|
|
|
2024-10-18 12:31:28 +08:00
|
|
|
- run: tar -xzf package.tar.gz
|
2021-04-09 02:12:01 +08:00
|
|
|
|
2024-10-18 12:31:28 +08:00
|
|
|
- run: cd release && npm install --unsafe-perm --omit=dev
|
2021-04-09 02:12:01 +08:00
|
|
|
|
2021-11-04 05:17:43 +08:00
|
|
|
- name: Install Playwright OS dependencies
|
2021-11-05 00:39:27 +08:00
|
|
|
run: |
|
|
|
|
./test/node_modules/.bin/playwright install-deps
|
|
|
|
./test/node_modules/.bin/playwright install
|
2021-04-09 02:12:01 +08:00
|
|
|
|
2024-10-18 12:31:28 +08:00
|
|
|
- run: CODE_SERVER_TEST_ENTRY=./release npm run test:e2e
|
2021-04-09 02:12:01 +08:00
|
|
|
|
|
|
|
- name: Upload test artifacts
|
|
|
|
if: always()
|
2024-01-06 06:32:10 +08:00
|
|
|
uses: actions/upload-artifact@v4
|
2021-04-09 02:12:01 +08:00
|
|
|
with:
|
2021-04-15 03:03:47 +08:00
|
|
|
name: failed-test-videos
|
|
|
|
path: ./test/test-results
|
2022-08-10 02:24:37 +08:00
|
|
|
|
|
|
|
- name: Remove release packages and test artifacts
|
2022-09-28 02:46:37 +08:00
|
|
|
run: rm -rf ./release ./test/test-results
|
2022-08-10 02:24:37 +08:00
|
|
|
|
|
|
|
test-e2e-proxy:
|
2022-09-28 02:46:37 +08:00
|
|
|
name: Run e2e tests behind proxy
|
|
|
|
needs: build
|
2024-11-02 04:32:25 +08:00
|
|
|
runs-on: ubuntu-22.04
|
2022-08-10 02:24:37 +08:00
|
|
|
timeout-minutes: 25
|
|
|
|
steps:
|
|
|
|
- name: Checkout repo
|
2023-10-05 07:50:11 +08:00
|
|
|
uses: actions/checkout@v4
|
2022-08-10 02:24:37 +08:00
|
|
|
|
2023-09-21 07:33:28 +08:00
|
|
|
- name: Install system dependencies
|
|
|
|
run: sudo apt update && sudo apt install -y libkrb5-dev
|
|
|
|
|
2023-11-15 05:45:56 +08:00
|
|
|
- name: Install Node.js
|
2023-11-15 02:23:05 +08:00
|
|
|
uses: actions/setup-node@v4
|
2022-08-10 02:24:37 +08:00
|
|
|
with:
|
2023-11-15 05:45:56 +08:00
|
|
|
node-version-file: .node-version
|
2024-10-18 12:31:28 +08:00
|
|
|
cache: npm
|
|
|
|
cache-dependency-path: |
|
|
|
|
package-lock.json
|
|
|
|
test/package-lock.json
|
2022-08-10 02:24:37 +08:00
|
|
|
|
2024-10-18 12:31:28 +08:00
|
|
|
- run: SKIP_SUBMODULE_DEPS=1 npm ci
|
2022-08-10 02:24:37 +08:00
|
|
|
|
2022-09-28 02:46:37 +08:00
|
|
|
- name: Download npm package
|
2024-01-06 06:32:33 +08:00
|
|
|
uses: actions/download-artifact@v4
|
2022-08-10 02:24:37 +08:00
|
|
|
with:
|
2022-09-28 02:46:37 +08:00
|
|
|
name: npm-package
|
2022-08-10 02:24:37 +08:00
|
|
|
|
2024-10-18 12:31:28 +08:00
|
|
|
- run: tar -xzf package.tar.gz
|
2022-09-28 02:46:37 +08:00
|
|
|
|
2024-10-18 12:31:28 +08:00
|
|
|
- run: cd release && npm install --unsafe-perm --omit=dev
|
2022-08-10 02:24:37 +08:00
|
|
|
|
|
|
|
- name: Install Playwright OS dependencies
|
|
|
|
run: |
|
|
|
|
./test/node_modules/.bin/playwright install-deps
|
|
|
|
./test/node_modules/.bin/playwright install
|
|
|
|
|
|
|
|
- name: Cache Caddy
|
2024-02-02 09:38:25 +08:00
|
|
|
uses: actions/cache@v4
|
2022-08-10 02:24:37 +08:00
|
|
|
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"
|
2023-02-07 01:56:47 +08:00
|
|
|
mkdir -p ~/.cache/caddy
|
2022-08-10 02:24:37 +08:00
|
|
|
tar -xzf caddy_2.5.2_linux_amd64.tar.gz --directory ~/.cache/caddy
|
|
|
|
|
2024-10-18 12:31:28 +08:00
|
|
|
- run: sudo ~/.cache/caddy/caddy start --config ./ci/Caddyfile
|
2022-08-10 02:24:37 +08:00
|
|
|
|
2024-10-18 12:31:28 +08:00
|
|
|
- run: CODE_SERVER_TEST_ENTRY=./release npm run test:e2e:proxy
|
2022-08-10 02:24:37 +08:00
|
|
|
|
2024-10-18 12:31:28 +08:00
|
|
|
- if: always()
|
2022-08-10 02:24:37 +08:00
|
|
|
run: sudo ~/.cache/caddy/caddy stop --config ./ci/Caddyfile
|
|
|
|
|
2024-10-18 12:31:28 +08:00
|
|
|
- if: always()
|
2024-01-06 06:32:10 +08:00
|
|
|
uses: actions/upload-artifact@v4
|
2022-08-10 02:24:37 +08:00
|
|
|
with:
|
|
|
|
name: failed-test-videos-proxy
|
|
|
|
path: ./test/test-results
|