Skip to content

Commit ce108f8

Browse files
committed
add github action
1 parent 86593b0 commit ce108f8

File tree

1 file changed

+63
-0
lines changed

1 file changed

+63
-0
lines changed

.github/workflows/ci.yml

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
name: CI
2+
3+
on: [push]
4+
5+
jobs:
6+
test:
7+
runs-on: ${{ matrix.os }}
8+
strategy:
9+
matrix:
10+
os: [ubuntu-latest, windows-latest, macos-latest]
11+
node-version: [18.x, 20.x]
12+
13+
steps:
14+
- name: Checkout code
15+
uses: actions/checkout@v4
16+
17+
- name: Setup Node.js ${{ matrix.node-version }}
18+
uses: actions/setup-node@v4
19+
with:
20+
node-version: ${{ matrix.node-version }}
21+
cache: 'npm'
22+
23+
- name: Install dependencies
24+
run: npm ci
25+
26+
- name: Run linting
27+
run: npm run lint
28+
29+
- name: Compile TypeScript
30+
run: npm run compile
31+
32+
- name: Run tests
33+
uses: coactions/setup-xvfb@v1
34+
with:
35+
run: npm test
36+
37+
package:
38+
runs-on: ubuntu-latest
39+
needs: test
40+
41+
steps:
42+
- name: Checkout code
43+
uses: actions/checkout@v4
44+
45+
- name: Setup Node.js
46+
uses: actions/setup-node@v4
47+
with:
48+
node-version: '20.x'
49+
cache: 'npm'
50+
51+
- name: Install dependencies
52+
run: npm ci
53+
54+
- name: Package extension
55+
run: |
56+
npm install -g @vscode/vsce
57+
vsce package
58+
59+
- name: Upload VSIX artifact
60+
uses: actions/upload-artifact@v4
61+
with:
62+
name: vscode-extension
63+
path: '*.vsix'

0 commit comments

Comments
 (0)