-
Notifications
You must be signed in to change notification settings - Fork 74
80 lines (77 loc) · 2.12 KB
/
ci.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
74
75
76
77
78
79
80
name: Node.js CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
env:
FORCE_COLOR: 1
jobs:
test:
runs-on: ${{ matrix.os }}
name: Run tests on ${{ matrix.os }}, Node ${{ matrix.node-version }}
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest, windows-latest, macos-latest ]
node-version: [ 16 ]
include:
- os: ubuntu-latest
node-version: 18
steps:
- uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: npx playwright install chromium
- run: npm run lint
- run: npm run build
- run: npm run test -- --workers=1
- run: npx vsce package
if: matrix.os == 'ubuntu-latest' && matrix.node-version == '16'
- uses: actions/upload-artifact@v3
if: matrix.os == 'ubuntu-latest' && matrix.node-version == '16'
with:
name: vsc-extension
path: "*.vsix"
retention-days: 30
test-e2e:
runs-on: ${{ matrix.os }}
name: Run e2e tests
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest ]
env:
DEBUG: pw:browser
steps:
- uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: 18
- run: npm ci
- run: npx playwright install --with-deps chromium
- run: npm run build
- run: npm ci
working-directory: ./tests-integration
- run: xvfb-run npx playwright test
working-directory: ./tests-integration
if: matrix.os == 'ubuntu-latest'
- run: npx playwright test
working-directory: ./tests-integration
if: matrix.os != 'ubuntu-latest'
- uses: actions/upload-artifact@v3
if: always()
with:
name: playwright-report-${{ matrix.os }}
path: tests-integration/playwright-report/
retention-days: 30
- uses: actions/upload-artifact@v3
if: failure()
with:
name: playwright-test-results-${{ matrix.os }}
path: tests-integration/test-results/
retention-days: 10