-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (44 loc) · 1.19 KB
/
Copy pathci.yml
File metadata and controls
54 lines (44 loc) · 1.19 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
name: CI
on:
pull_request:
branches: [main, master]
push:
branches: [main, master]
merge_group:
concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
quality-gate:
name: Quality Gate
runs-on: windows-latest
timeout-minutes: 20
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "22"
cache: npm
- name: Install dependencies
run: npm ci
- name: Verify unit tests exist
shell: pwsh
run: |
$tests = Get-ChildItem -Path . -Recurse -File -ErrorAction SilentlyContinue |
Where-Object {
$_.FullName -notmatch '\\node_modules\\|\\dist\\|\\release\\' -and
$_.Name -match '\.(test|spec)\.[jt]sx?$'
}
if (-not $tests) {
Write-Error "No unit tests found (*.test.* / *.spec.*)."
exit 1
}
Write-Host "Found $($tests.Count) test file(s)."
- name: Lint
run: npm run lint
- name: Build
run: npm run build
- name: Test
run: npm test