-
Notifications
You must be signed in to change notification settings - Fork 1
73 lines (57 loc) · 1.55 KB
/
main.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
63
64
65
66
67
68
69
70
71
72
73
name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main
env:
node-version: 20.x
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
issues: read
checks: write
pull-requests: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ env.node-version }}
cache: 'npm'
- name: Install dependencies
run: npm install
- name: Run Linting
run: npm run lint
- name: Upload eslint results code scanning
uses: github/codeql-action/upload-sarif@v3
if: always() && github.actor != 'dependabot[bot]'
with:
category: eslint
sarif_file: eslint.sarif
- name: Run tests Linux
run: xvfb-run -a npm test
if: runner.os == 'Linux'
- name: Run tests non Linux
run: npm test
if: runner.os != 'Linux'
- name: Publish Integration Test Results
if: always() && github.actor != 'dependabot[bot]'
uses: EnricoMi/publish-unit-test-result-action@v2
with:
files: './junit-testresults.xml'
check_name: Tests
- name: Install vsce
run: npm install -g @vscode/vsce
- name: Package
run: vsce package
- name: Upload extension as an artifact
uses: actions/upload-artifact@v4
with:
name: extension
path: '*.vsix'