Skip to content

Commit 23f3634

Browse files
authored
ci: run integration tests on all three OSes (#81)
Expand integration-test to a matrix of ubuntu-latest, macos-latest, and windows-latest. Use xvfb-run on Linux for headless display. Restrict harden-runner to Linux only (it only supports Ubuntu VMs). Closes #79 Signed-off-by: Sebastien Tardif <sebtardif@ncf.ca>
1 parent 6fcf72a commit 23f3634

1 file changed

Lines changed: 16 additions & 1 deletion

File tree

.github/workflows/ci.yml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,15 @@ jobs:
6868

6969
integration-test:
7070
needs: [unit-test, build]
71-
runs-on: macos-latest
71+
strategy:
72+
fail-fast: false
73+
matrix:
74+
os: [ubuntu-latest, macos-latest, windows-latest]
75+
runs-on: ${{ matrix.os }}
7276
timeout-minutes: 15
7377
steps:
7478
- name: Harden runner
79+
if: runner.os == 'Linux'
7580
uses: step-security/harden-runner@9af89fc71515a100421586dfdb3dc9c984fbf411 # v2.19.4
7681
with:
7782
egress-policy: audit
@@ -87,7 +92,12 @@ jobs:
8792
- name: Compile extension and tests
8893
run: npm run compile && npm run compile-tests
8994

95+
- name: Run extension integration tests (Linux)
96+
if: runner.os == 'Linux'
97+
run: xvfb-run -a npm run test:extension
98+
9099
- name: Run extension integration tests
100+
if: runner.os != 'Linux'
91101
run: npm run test:extension
92102

93103
- name: Setup UI test VS Code
@@ -96,5 +106,10 @@ jobs:
96106
- name: Patch test VS Code to run as background app
97107
run: bash scripts/hide-test-vscode.sh
98108

109+
- name: Run UI tests (Linux)
110+
if: runner.os == 'Linux'
111+
run: xvfb-run -a npx extest run-tests './out-uitest/test/ui/*.test.js' --extensions_dir .vscode-test/extensions
112+
99113
- name: Run UI tests
114+
if: runner.os != 'Linux'
100115
run: npx extest run-tests './out-uitest/test/ui/*.test.js' --extensions_dir .vscode-test/extensions

0 commit comments

Comments
 (0)