-
Notifications
You must be signed in to change notification settings - Fork 1
154 lines (145 loc) · 5.34 KB
/
Copy pathconformance.yml
File metadata and controls
154 lines (145 loc) · 5.34 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
153
154
name: Store Conformance Matrix
# Runs the Store TCK from @rotorsoft/act-tck against every supported
# version of the in-tree backend adapters. Catches dialect-specific
# regressions (PG SKIP LOCKED behavior across majors, libSQL release
# bumps) that the single-version `CI-CD` job can't see.
#
# Informational, not required for branch protection. A red cell signals
# "this version slipped" — author owns the call to revert, pin, or
# document the loss of support.
on:
pull_request:
paths:
- "libs/act-pg/**"
- "libs/act-sqlite/**"
- "libs/act-notify/**"
- "libs/act-tck/**"
- "libs/act/src/types/ports.ts"
- ".github/workflows/conformance.yml"
push:
branches: [master]
paths:
- "libs/act-pg/**"
- "libs/act-sqlite/**"
- "libs/act-notify/**"
- "libs/act-tck/**"
- "libs/act/src/types/ports.ts"
- ".github/workflows/conformance.yml"
workflow_dispatch:
permissions:
contents: read
env:
SKIP_SIMPLE_GIT_HOOKS: 1
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
jobs:
pg:
name: pg-${{ matrix.pg }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
# PostgreSQL 13 went EOL 2025-11. 14 is the oldest still
# security-patched line; 18 is what `ci-cd.yml` uses as the
# ground-truth single-version run.
pg: ["14", "15", "16", "17"]
services:
postgres:
image: postgres:${{ matrix.pg }}-alpine
env:
POSTGRES_PASSWORD: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5431:5432
steps:
- uses: actions/checkout@v7
- uses: pnpm/action-setup@v6
with:
run_install: false
- uses: actions/setup-node@v7
with:
node-version: 22.23.2
cache: "pnpm"
- run: pnpm install
- name: Run TCK against PostgreSQL ${{ matrix.pg }}
run: pnpm -F @rotorsoft/act-pg exec vitest run test/store-tck.spec.ts
# act-notify runs the full Store TCK over withBroker(PostgresStore),
# so a with-broker.ts change gets the same multi-version PG coverage
# as the base adapter (its correctness rides on PG semantics).
- name: Run act-notify TCK against PostgreSQL ${{ matrix.pg }}
run: pnpm -F @rotorsoft/act-notify exec vitest run test/store-tck.spec.ts
sqlite:
name: libsql-${{ matrix.libsql }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
# Pinned version is what the lockfile resolves to today; `latest`
# answers "does the next libSQL release break us before we adopt
# it." Two cells is enough — libSQL's surface is small and the
# release cadence makes a wider matrix expensive to maintain.
libsql:
- pinned
- latest
steps:
- uses: actions/checkout@v7
- uses: pnpm/action-setup@v6
with:
run_install: false
- uses: actions/setup-node@v7
with:
node-version: 22.23.2
cache: "pnpm"
- name: Override @libsql/client to latest
if: matrix.libsql == 'latest'
# `pnpm.overrides` survives `pnpm install` and is the idiomatic
# way to swap a transitive version in a workspace. Writing into
# the root package.json keeps the change scoped to this job.
run: |
node -e '
const fs = require("fs");
const pkg = JSON.parse(fs.readFileSync("package.json", "utf8"));
pkg.pnpm = pkg.pnpm ?? {};
pkg.pnpm.overrides = pkg.pnpm.overrides ?? {};
pkg.pnpm.overrides["@libsql/client"] = "latest";
fs.writeFileSync("package.json", JSON.stringify(pkg, null, 2));
'
cat package.json | grep -A 3 '"pnpm"' || true
- run: pnpm install --no-frozen-lockfile
- name: Print resolved @libsql/client version
run: pnpm list --filter @rotorsoft/act-sqlite @libsql/client --depth 0
- name: Run TCK against libSQL ${{ matrix.libsql }}
run: pnpm -F @rotorsoft/act-sqlite exec vitest run test/store-tck.spec.ts
summary:
# Always runs so the workflow summary is populated even when a cell
# fails. `if: always()` is required because the matrix jobs' failure
# would otherwise mark this dependency as skipped.
if: always()
needs: [pg, sqlite]
runs-on: ubuntu-latest
steps:
- name: Compose conformance table
run: |
status() {
case "$1" in
success) echo "✅" ;;
failure) echo "❌" ;;
cancelled) echo "⚪" ;;
*) echo "❓" ;;
esac
}
{
echo "## Store conformance matrix"
echo ""
echo "| Adapter | Version | Result |"
echo "|---|---|---|"
# The `needs.<job>.result` for a matrix job rolls up to the
# worst single cell; per-cell detail is in the run UI.
echo "| PostgreSQL | 14, 15, 16, 17 | $(status ${{ needs.pg.result }}) |"
echo "| libSQL | pinned + latest | $(status ${{ needs.sqlite.result }}) |"
echo ""
echo "Per-version detail in the [run page](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})."
} >> "$GITHUB_STEP_SUMMARY"