Skip to content

Commit e8aced6

Browse files
authored
[Refactor:System] Fix GitHub Actions test runner (#4)
* fix tests not running * setup caching
1 parent 0e546fe commit e8aced6

1 file changed

Lines changed: 21 additions & 11 deletions

File tree

Lines changed: 21 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,38 @@
1-
name: Lint and Test
1+
name: Run VSCode Extension Tests
2+
23
on:
34
push:
4-
branches:
5-
- master
5+
branches: [main]
66
pull_request:
7-
branches:
8-
- master
7+
branches: [main]
98

109
jobs:
1110
test:
12-
runs-on: ubuntu-latest
13-
11+
strategy:
12+
matrix:
13+
node-version: [22.x]
14+
os: [ubuntu-latest, windows-latest, macos-latest]
15+
runs-on: ${{ matrix.os }}
1416
steps:
1517
- name: Checkout code
1618
uses: actions/checkout@v4
1719

18-
- name: Setup Node.js
20+
- name: Setup Node.js environment
1921
uses: actions/setup-node@v4
2022
with:
21-
node-version: "20"
23+
node-version: ${{ matrix.node-version }}
2224
cache: "npm"
2325

2426
- name: Install dependencies
2527
run: npm ci
26-
# Runs both the test and lint commands
27-
- name: Run tests
28+
29+
- name: Compile
30+
run: npm run compile
31+
32+
- name: Run tests (Linux)
33+
run: xvfb-run -a npm test
34+
if: runner.os == 'Linux'
35+
36+
- name: Run tests (Windows/Mac)
2837
run: npm test
38+
if: runner.os != 'Linux'

0 commit comments

Comments
 (0)