-
Notifications
You must be signed in to change notification settings - Fork 2
44 lines (44 loc) · 1.28 KB
/
dev-test.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
name: Development and Testing
on:
push:
branches:
- '*'
jobs:
build:
strategy:
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
- run: npm i -g @vscode/vsce pnpm
- name: Cache dependencies
uses: actions/cache@v4
id: cache
with:
path: |
**/node_modules
key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-
- name: Install dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: pnpm i --frozen-lockfile --ignore-scripts
- name: Linux test
if: runner.os == 'Linux'
env:
DBUS_SESSION_BUS_ADDRESS: unix:path=/run/dbus/system_bus_socket
TS_NODE_PROJECT: tsconfig.mocha.json
run: |
sudo systemctl start dbus
xvfb-run -a pnpm test:suite:mocha
- name: Other platform test
if: runner.os != 'Linux'
env:
TS_NODE_PROJECT: tsconfig.mocha.json
run: pnpm test:suite:mocha
- run: pnpm run test:coverage
- run: vsce package --no-dependencies