-
-
Notifications
You must be signed in to change notification settings - Fork 42
75 lines (67 loc) · 1.88 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
name: " 🧪 build-test"
on: # rebuild any PRs and main branch changes
workflow_dispatch:
pull_request:
push:
branches:
- main
jobs:
list_extensions:
runs-on: ubuntu-latest
outputs:
extension_list: ${{ env.EXTENSION_LIST }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: From Script
run: |
echo extensions_from_script=$(./scripts/list-extensions.sh) >> $GITHUB_ENV
- name: EXTENSION_LIST
env:
EXTENSION_LIST: ${{ env.extensions_from_script }}
run: |
echo EXTENSION_LIST=$EXTENSION_LIST >> $GITHUB_ENV
build-test:
runs-on: ubuntu-latest
needs:
- list_extensions
strategy:
matrix:
extension_dir: ${{ fromJSON(needs.list_extensions.outputs.extension_list) }}
steps:
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ vars.DEFAULT_NODE_VERSION }}
cache: npm
- run: npm install
- run: |
cd ${{ matrix.extension_dir }}
npm run pack-extension
npm run test:cspell
- name: Run Linux
if: runner.os == 'Linux'
run: |
cd ${{ matrix.extension_dir }}
xvfb-run -a npm run test
- name: Run Windows and MacOS
if: runner.os != 'Linux'
run: |
cd ${{ matrix.extension_dir }}
npm run test
# Run the spell checker on all the samples using the extension's settings.
# This will help with dictionary updates.
check-samples:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: ${{ vars.DEFAULT_NODE_VERSION }}
cache: npm
- run: npm install
- name: Check Samples
run: |
npm run test:cspell