Repository navigation
98 lines (83 loc) · 2.91 KB
/
Copy pathtest.yml
File metadata and controls
98 lines (83 loc) · 2.91 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
name: test
# Pull requests gate what is proposed; the push trigger gates what actually
# landed. Without it a merge is only ever validated against the pull request's
# own head, so master carries no verdict of its own — and #62 merged eight
# minutes before its checks reported failure on all three platforms, leaving the
# default branch red with nothing to say so.
on:
push:
branches: [master]
pull_request:
branches: [master]
# One live run per branch. Without this, a branch under active review queues a
# fresh three-platform run per push while every superseded one still holds
# runners — and the verdict that matters, the one for the current head, waits
# behind results nobody can merge on, because a green check belonging to an
# older SHA proves nothing about this one.
#
# `master` is excluded from cancellation: a push there is the verdict on what
# actually landed, and each commit needs its own.
concurrency:
group: test-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}
jobs:
test:
name: ${{ matrix.os }} / node ${{ matrix.node }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
node: [22.x]
steps:
- name: Checkout
uses: actions/checkout@v7
- name: Enable pnpm
run: corepack enable
- name: Setup Node
uses: actions/setup-node@v7
with:
node-version: ${{ matrix.node }}
cache: pnpm
cache-dependency-path: pnpm-lock.yaml
- name: Setup Go
uses: actions/setup-go@v7
with:
go-version: 1.26.5
cache-dependency-path: sidecars/go/go.sum
- name: Configure pnpm
run: |
pnpm config set fetch-retries 5
pnpm config set fetch-retry-factor 2
pnpm config set fetch-retry-mintimeout 20000
pnpm config set fetch-retry-maxtimeout 120000
pnpm config set registry https://registry.npmjs.org/
- name: Install
shell: pwsh
run: |
for ($attempt = 1; $attempt -le 3; $attempt++) {
pnpm install --frozen-lockfile
if ($LASTEXITCODE -eq 0) {
exit 0
}
if ($attempt -eq 3) {
exit $LASTEXITCODE
}
Start-Sleep -Seconds (15 * $attempt)
if (Test-Path node_modules) {
Remove-Item -Recurse -Force node_modules -ErrorAction SilentlyContinue
}
}
- name: Build
run: pnpm run build
- name: Check provider support
run: pnpm provider-support
- name: Test Go sidecar
working-directory: sidecars/go
run: go test ./...
- name: Test
run: pnpm test
- name: Test deterministic benchmark contracts
run: pnpm --filter @samchon/graph-benchmark test
- name: Coverage
run: pnpm coverage