Spawn a code-server instance for each test suite
This uses the current dev build by default but can be overidden with CODE_SERVER_TEST_ENTRY (for example to test a release or some other version). Each instance has a separate state directory. This should make parallelization work. This also means you are no longer required to specify the password and address yourself (or the extension directory once we add a test extension). `yarn test:e2e` should just work as-is. Lastly, it means the tests are no longer subject to yarn watch randomly restarting.
This commit is contained in:
15
.github/workflows/ci.yaml
vendored
15
.github/workflows/ci.yaml
vendored
@ -334,8 +334,9 @@ jobs:
|
||||
needs: package-linux-amd64
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
PASSWORD: e45432jklfdsab
|
||||
CODE_SERVER_ADDRESS: http://localhost:8080
|
||||
# Since we build code-server we might as well run tests from the release
|
||||
# since VS Code will load faster due to the bundling.
|
||||
CODE_SERVER_TEST_ENTRY: "./release-packages/code-server-linux-amd64"
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
@ -362,9 +363,11 @@ jobs:
|
||||
name: release-packages
|
||||
path: ./release-packages
|
||||
|
||||
- name: Untar code-server file
|
||||
- name: Untar code-server release
|
||||
run: |
|
||||
cd release-packages && tar -xzf code-server*-linux-amd64.tar.gz
|
||||
cd release-packages
|
||||
tar -xzf code-server*-linux-amd64.tar.gz
|
||||
mv code-server*-linux-amd64 code-server-linux-amd64
|
||||
|
||||
- name: Install dependencies
|
||||
if: steps.cache-yarn.outputs.cache-hit != 'true'
|
||||
@ -380,9 +383,7 @@ jobs:
|
||||
yarn install --check-files
|
||||
|
||||
- name: Run end-to-end tests
|
||||
run: |
|
||||
./release-packages/code-server*-linux-amd64/bin/code-server --log trace &
|
||||
yarn test:e2e
|
||||
run: yarn test:e2e
|
||||
|
||||
- name: Upload test artifacts
|
||||
if: always()
|
||||
|
Reference in New Issue
Block a user