Skip to content

Commit c1b40a5

Browse files
committed
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).
1 parent 353c2a1 commit c1b40a5

File tree

1 file changed

+13
-10
lines changed

1 file changed

+13
-10
lines changed

.github/workflows/ci.yaml

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@ jobs:
1919
name: Pre-build checks
2020
runs-on: ubuntu-latest
2121
timeout-minutes: 15
22-
env:
23-
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
2422
steps:
2523
- name: Checkout repo
2624
uses: actions/checkout@v2
@@ -54,14 +52,6 @@ jobs:
5452
run: yarn lint
5553
if: success()
5654

57-
- name: Run code-server unit tests
58-
run: yarn test:unit
59-
if: success()
60-
61-
- name: Upload coverage report to Codecov
62-
run: yarn coverage
63-
if: success()
64-
6555
audit-ci:
6656
name: Run audit-ci
6757
needs: prebuild
@@ -98,6 +88,8 @@ jobs:
9888
needs: prebuild
9989
runs-on: ubuntu-latest
10090
timeout-minutes: 30
91+
env:
92+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
10193
steps:
10294
- uses: actions/checkout@v2
10395
with:
@@ -154,6 +146,17 @@ jobs:
154146
if: steps.cache-vscode.outputs.cache-hit != 'true'
155147
run: yarn build:vscode
156148

149+
# Our code imports code from VS Code's output directory meaning VS Code
150+
# must be built before running these tests.
151+
# TODO: Move to its own step?
152+
- name: Run code-server unit tests
153+
run: yarn test:unit
154+
if: success()
155+
156+
- name: Upload coverage report to Codecov
157+
run: yarn coverage
158+
if: success()
159+
157160
# The release package does not contain any native modules
158161
# and is neutral to architecture/os/libc version.
159162
- name: Create release package

0 commit comments

Comments
 (0)