-
Notifications
You must be signed in to change notification settings - Fork 2
62 lines (53 loc) · 1.48 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
on:
push:
branches:
- main
pull_request:
workflow_dispatch:
permissions:
contents: read
actions: read
checks: write
jobs:
build:
name: Build and Test
strategy:
fail-fast: false
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
vscode-version: ['stable', 'insiders']
vscode-platform: ['desktop']
runs-on: ${{ matrix.os }}
env:
VSCODE_TEST_VERSION: ${{matrix.vscode-version}}
VSCODE_TEST_PLATFORM: ${{matrix.vscode-platform}}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: lts/*
- name: Install dependencies
run: npm install
- name: Compile
run: npm run compile:test
- name: Print Test Config
run: node ./.vscode-test.mjs
env:
VSCODE_CONFIG_LOG: true
- name: Run Tests (Linux)
run: xvfb-run -a npm test
if: runner.os == 'Linux'
- name: Run Tests (Win/MacOS)
run: npm test
if: runner.os != 'Linux'
- name: Run Linter
if: always()
run: npm run lint
- uses: dorny/test-reporter@v1
if: always()
with:
name: VS Code Test Results (${{matrix.os}}, ${{matrix.vscode-version}}, ${{matrix.vscode-platform}})
path: 'test-results/*.json'
reporter: mocha-json