-
Notifications
You must be signed in to change notification settings - Fork 1
100 lines (79 loc) · 2.57 KB
/
Copy pathci.yml
File metadata and controls
100 lines (79 loc) · 2.57 KB
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
93
94
95
96
97
98
99
100
name: ci
on:
push:
branches: [main]
pull_request:
merge_group:
workflow_dispatch:
permissions:
contents: read
concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
jobs:
unit-test:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
timeout-minutes: 10
steps:
- name: Harden runner
uses: step-security/harden-runner@9af89fc71515a100421586dfdb3dc9c984fbf411 # v2.19.4
with:
egress-policy: audit
- name: Checkout
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
with:
persist-credentials: false
- name: Setup Node.js
uses: ./.github/actions/setup-node
- name: Run tests
run: npm test
- name: Check code coverage
if: matrix.os == 'ubuntu-latest'
run: npm run test:coverage
build:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Harden runner
uses: step-security/harden-runner@9af89fc71515a100421586dfdb3dc9c984fbf411 # v2.19.4
with:
egress-policy: audit
- name: Checkout
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
with:
persist-credentials: false
- name: Setup Node.js
uses: ./.github/actions/setup-node
- name: Compile
run: npm run compile
- name: Package extension
run: npm run package
integration-test:
needs: [unit-test, build]
runs-on: macos-latest
timeout-minutes: 15
steps:
- name: Harden runner
uses: step-security/harden-runner@9af89fc71515a100421586dfdb3dc9c984fbf411 # v2.19.4
with:
egress-policy: audit
- name: Checkout
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
with:
persist-credentials: false
- name: Setup Node.js
uses: ./.github/actions/setup-node
- name: Compile extension and tests
run: npm run compile && npm run compile-tests
- name: Run extension integration tests
run: npm run test:extension
- name: Setup UI test VS Code
run: npx extest setup-tests --code_version max --extensions_dir .vscode-test/extensions
- name: Patch test VS Code to run as background app
run: bash scripts/hide-test-vscode.sh
- name: Run UI tests
run: npx extest run-tests './out-uitest/test/ui/*.test.js' --extensions_dir .vscode-test/extensions