-
Notifications
You must be signed in to change notification settings - Fork 1
74 lines (60 loc) · 1.7 KB
/
Copy pathci.yml
File metadata and controls
74 lines (60 loc) · 1.7 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
name: CI
on:
pull_request:
push:
branches: [main]
permissions:
contents: read
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node-version: [20.x, 22.x]
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: npm
- name: Install dependencies
run: npm ci
- name: Build grammar
run: npm run build
- name: Verify committed grammars are in sync with the source
run: |
if ! git diff --exit-code -- grammars/; then
echo "::error::grammars/ is out of date. Run 'npm run build' and commit the result."
exit 1
fi
- name: Run tests
run: npm test
# Tokenizes the official Q# samples from a pinned QDK release and fails if
# any of them produce `invalid` / `illegal` scopes. Bump QDK_REF to test
# against a newer language surface.
corpus:
runs-on: ubuntu-latest
env:
QDK_REF: v1.29.0
steps:
- uses: actions/checkout@v4
- name: Check out the QDK samples (pinned)
uses: actions/checkout@v4
with:
repository: microsoft/qdk
ref: ${{ env.QDK_REF }}
path: qdk
sparse-checkout: samples
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 20.x
cache: npm
- name: Install dependencies
run: npm ci
- name: Run tests against the QDK ${{ env.QDK_REF }} samples
env:
QDK_SAMPLES: ${{ github.workspace }}/qdk/samples
run: npm test