-
Notifications
You must be signed in to change notification settings - Fork 69
62 lines (49 loc) · 1.1 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
name: Node PR Lint, Build and Test
on:
# Trigger when manually run
workflow_dispatch:
# Trigger on pushes to `main` or `rel/*`
push:
branches:
- main
- rel/*
# Trigger on pull requests to `main` or `rel/*`
pull_request:
branches:
- main
- rel/*
- dev/*
jobs:
Build:
runs-on: ubuntu-latest
defaults:
run:
working-directory: '.'
steps:
# Setup
- uses: actions/checkout@v4
- name: Using Node.js
uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
- run: npm ci
- name: Lint
run: npm run lint
- name: Prettier
run: npm run prettier
- name: Compile
run: npm run build
- name: Package
run: npm run package
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: Artifacts
path: |
**/*.vsix
**/*.tgz
!**/node_modules
- name: Unit Tests
run: npm run jesttest
- name: Integration Tests
run: xvfb-run -a npm test