-
Notifications
You must be signed in to change notification settings - Fork 0
152 lines (145 loc) · 4.54 KB
/
Copy pathci.yml
File metadata and controls
152 lines (145 loc) · 4.54 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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
name: CI
on:
pull_request:
push:
branches:
- main
permissions:
contents: read
concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
quality-unix:
name: quality-${{ matrix.platform }}
strategy:
fail-fast: false
matrix:
include:
- platform: ubuntu
os: ubuntu-latest
- platform: macos
os: macos-latest
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v7
- uses: actions/setup-node@v6
with:
node-version: 18
cache: npm
- name: Install jq for legacy validator on Linux
if: runner.os == 'Linux'
run: sudo apt-get update && sudo apt-get install -y jq
- name: Install jq for legacy validator on macOS
if: runner.os == 'macOS'
run: brew install jq
- name: Install dependencies
run: npm ci
- name: Build and typecheck
run: npm run build && npm run typecheck
- name: Test
run: npm run test:functional
- name: Contributor onboarding
timeout-minutes: 16
run: npm run test:onboarding
- name: Shell syntax
run: sh -n scripts/validate.sh && node --check templates/pre-commit
- name: Check and doctor worked example
run: |
mkdir -p graph evidence
cp -R examples/worked-example/graph/. graph/
cp -R examples/worked-example/evidence/. evidence/
node dist/src/cli.js check
node dist/src/cli.js doctor
- name: Package smoke
run: npm run package:smoke
quality-windows-git-bash:
name: quality-windows-git-bash
runs-on: windows-latest
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v7
- uses: actions/setup-node@v6
with:
node-version: 18
cache: npm
- name: Install jq for legacy validator
shell: pwsh
run: choco install jq -y --no-progress
- name: Install dependencies
run: npm ci
- name: Build and typecheck
run: npm run build && npm run typecheck
- name: Test in Git Bash
run: npm run test:functional
- name: Contributor onboarding
timeout-minutes: 16
run: npm run test:onboarding
- name: Shell syntax
run: sh -n scripts/validate.sh && node --check templates/pre-commit
- name: Check and doctor worked example
run: |
mkdir -p graph evidence
cp -R examples/worked-example/graph/. graph/
cp -R examples/worked-example/evidence/. evidence/
node dist/src/cli.js check
node dist/src/cli.js doctor
- name: Package smoke
run: npm run package:smoke
quality-windows-powershell:
name: quality-windows-powershell
runs-on: windows-latest
defaults:
run:
shell: pwsh
steps:
- uses: actions/checkout@v7
- uses: actions/setup-node@v6
with:
node-version: 18
cache: npm
- name: Install dependencies without legacy jq
run: npm ci
- name: Build and typecheck
run: npm run build; if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }; npm run typecheck
- name: Test native PowerShell graphkeeper.cmd and Git pre-commit paths
run: |
Remove-Item Env:MSYSTEM -ErrorAction SilentlyContinue
node --test --test-concurrency=1 `
dist/tests/unit/update.test.js `
dist/tests/integration/update-command.test.js `
dist/tests/integration/init-prerequisites.test.js `
dist/tests/integration/query-command.test.js `
dist/tests/integration/standalone-validator.test.js `
dist/tests/integration/templates.test.js `
dist/tests/integration/validator-modes.test.js `
dist/tests/e2e/pre-commit.test.js `
dist/tests/e2e/package-install.test.js
- name: Package smoke
run: npm run package:smoke
performance:
name: performance-${{ matrix.platform }}
strategy:
fail-fast: false
matrix:
include:
- platform: ubuntu
os: ubuntu-latest
- platform: windows-git-bash
os: windows-latest
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v7
- uses: actions/setup-node@v6
with:
node-version: 18
cache: npm
- name: Install dependencies
run: npm ci
- name: Run isolated performance budgets
run: npm run test:performance