-
Notifications
You must be signed in to change notification settings - Fork 180
92 lines (89 loc) · 2.45 KB
/
test.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
81
82
83
84
85
86
87
88
89
90
91
92
name: Run tests
on:
push:
branches:
- main
- pre-release
paths-ignore:
- 'syntaxes/**'
- 'tests/**'
- '**.md'
pull_request:
branches:
- main
- pre-release
paths-ignore:
- 'syntaxes/**'
- 'tests/**'
- '**.md'
jobs:
lint:
runs-on: ubuntu-latest
timeout-minutes: 3
steps:
- name: Checkout Repo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
with:
node-version-file: '.nvmrc'
cache: npm
- name: npm install
run: npm ci
- name: lint
run: npm run lint
- name: format
run: npm run check-format
test:
strategy:
fail-fast: false
matrix:
vscode:
- '1.92.2'
- 'insiders'
- 'stable'
os:
- windows-latest
- macos-latest
- ubuntu-latest
runs-on: ${{ matrix.os }}
timeout-minutes: 10
env:
VSCODE_VERSION: ${{ matrix.vscode }}
steps:
- name: Checkout Repo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
with:
node-version-file: '.nvmrc'
cache: npm
- name: Install Terraform
uses: hashicorp/setup-terraform@v3
with:
terraform_wrapper: false
terraform_version: '~1.9'
- name: Terraform version
run: terraform version
- name: Clean Install Dependencies
run: npm ci
- name: Allow unprivileged user namespace (ubuntu)
if: runner.os == 'Linux'
run: sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0
- name: Run Tests
run: xvfb-run -a npm test
if: runner.os == 'Linux'
- name: Run Tests
run: npm test
if: runner.os != 'Linux'
- name: Run UI Tests
run: xvfb-run --auto-servernum --server-args='-screen 0 1920x1080x24' npm run test:ui
if: runner.os == 'Linux'
- name: Run UI Tests
run: npm run test:ui
if: runner.os != 'Linux'
- name: Archive test artifacts
uses: actions/upload-artifact@v4
if: failure()
with:
name: test-screenshots-${{ matrix.os }}-${{ matrix.vscode }}
path: .test-storage/screenshots
retention-days: 1