-
Notifications
You must be signed in to change notification settings - Fork 4
64 lines (52 loc) · 1.53 KB
/
plugin-ci.yml
File metadata and controls
64 lines (52 loc) · 1.53 KB
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
63
name: Plugin CI
on:
push:
branches: [ main, plugin ]
paths:
- 'plugin/**'
- '.github/workflows/plugin-ci.yml'
pull_request:
branches: [ main ]
paths:
- 'plugin/**'
- '.github/workflows/plugin-ci.yml'
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
node-version: [18.x, 20.x]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
cache-dependency-path: plugin/package-lock.json
- name: Install dependencies
working-directory: plugin
run: npm ci
- name: Lint code
working-directory: plugin
run: npm run lint || echo "No lint script configured"
continue-on-error: true
- name: Compile TypeScript
working-directory: plugin
run: npm run compile
- name: Run tests
working-directory: plugin
run: npm test || echo "No tests configured"
continue-on-error: true
- name: Package extension
working-directory: plugin
run: npx vsce package
- name: Upload build artifact
if: matrix.os == 'ubuntu-latest' && matrix.node-version == '18.x'
uses: actions/upload-artifact@v4
with:
name: isl-language-support-build
path: plugin/*.vsix
retention-days: 7