-
Notifications
You must be signed in to change notification settings - Fork 1
196 lines (185 loc) · 6.15 KB
/
Copy pathci.yml
File metadata and controls
196 lines (185 loc) · 6.15 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
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
name: CI
on:
push:
pull_request:
workflow_dispatch:
permissions:
contents: read
jobs:
quality:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
- uses: actions/setup-node@249970729cb0ef3589644e2896645e5dc5ba9c38
with:
node-version: "24.15.0"
- run: corepack enable
- run: pnpm install --frozen-lockfile
- run: pnpm run format:check
- run: pnpm run check
- run: pnpm run test:coverage
- run: pnpm run build
- run: pnpm run pack:check
- run: pnpm run test:package
- run: pnpm run test:recovery
- run: pnpm run test:at-least-once
- run: pnpm audit --audit-level=high
floor:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
- uses: actions/setup-node@249970729cb0ef3589644e2896645e5dc5ba9c38
with:
node-version: "24.4.0"
- run: corepack enable
- run: pnpm install --frozen-lockfile
- run: pnpm run test
- run: pnpm run build
- run: pnpm run test:package
- run: pnpm run test:recovery
- run: pnpm run test:at-least-once
postgresql:
runs-on: ubuntu-latest
timeout-minutes: 15
strategy:
fail-fast: false
matrix:
postgresql-version: ["14", "18"]
services:
postgres:
image: postgres:${{ matrix.postgresql-version }}
env:
POSTGRES_USER: solid_objects
POSTGRES_PASSWORD: solid_objects
POSTGRES_DB: solid_objects_test
ports:
- 5432:5432
options: >-
--health-cmd "pg_isready -U solid_objects"
--health-interval 5s
--health-timeout 5s
--health-retries 10
env:
SOLID_OBJECTS_DATABASE_URL: postgresql://solid_objects:solid_objects@127.0.0.1:5432/solid_objects_test
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
- uses: actions/setup-node@249970729cb0ef3589644e2896645e5dc5ba9c38
with:
node-version: "24.15.0"
- run: corepack enable
- run: pnpm install --frozen-lockfile
- run: pnpm run test:postgresql
mysql:
runs-on: ubuntu-latest
timeout-minutes: 15
strategy:
fail-fast: false
matrix:
mysql-version: ["8.0", "8.4"]
services:
mysql:
image: mysql:${{ matrix.mysql-version }}
env:
MYSQL_ROOT_PASSWORD: solid_objects
MYSQL_DATABASE: solid_objects_test
MYSQL_USER: solid_objects
MYSQL_PASSWORD: solid_objects
ports:
- 3306:3306
options: >-
--health-cmd "mysqladmin ping -usolid_objects -psolid_objects --silent"
--health-interval 5s
--health-timeout 5s
--health-retries 20
env:
SOLID_OBJECTS_DATABASE_URL: mysql://solid_objects:solid_objects@127.0.0.1:3306/solid_objects_test
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
- uses: actions/setup-node@249970729cb0ef3589644e2896645e5dc5ba9c38
with:
node-version: "24.15.0"
- run: corepack enable
- run: pnpm install --frozen-lockfile
- run: pnpm run test:mysql
browser:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
- uses: actions/setup-node@249970729cb0ef3589644e2896645e5dc5ba9c38
with:
node-version: "24.15.0"
- run: corepack enable
- run: pnpm install --frozen-lockfile
- run: pnpm exec playwright install --with-deps chromium
- run: pnpm run test:browser
redis:
runs-on: ubuntu-latest
timeout-minutes: 15
services:
redis:
image: redis:7
ports:
- 6379:6379
options: >-
--health-cmd "redis-cli ping"
--health-interval 5s
--health-timeout 5s
--health-retries 10
env:
SOLID_OBJECTS_REDIS_URL: redis://127.0.0.1:6379
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
- uses: actions/setup-node@249970729cb0ef3589644e2896645e5dc5ba9c38
with:
node-version: "24.15.0"
- run: corepack enable
- run: pnpm install --frozen-lockfile
- run: pnpm run test:redis
publish:
if: startsWith(github.ref, 'refs/tags/v')
needs: [quality, floor, postgresql, mysql, browser, redis]
runs-on: ubuntu-latest
timeout-minutes: 15
permissions:
contents: write
id-token: write
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
- uses: actions/setup-node@249970729cb0ef3589644e2896645e5dc5ba9c38
with:
node-version: "24.15.0"
registry-url: "https://registry.npmjs.org"
package-manager-cache: false
- run: corepack enable
- run: pnpm install --frozen-lockfile
- run: npm install --global npm@11
- name: Validate release tag
id: release
run: |
package_version=$(node --print "require('./package.json').version")
tag_version=${GITHUB_REF_NAME#v}
if [ "$tag_version" != "$package_version" ]; then
echo "Tag $GITHUB_REF_NAME does not match package version $package_version" >&2
exit 1
fi
echo "specifier=solid-objects@$package_version" >> "$GITHUB_OUTPUT"
- name: Check npm registry
id: registry
run: |
if npm view "${{ steps.release.outputs.specifier }}" version >/dev/null 2>&1; then
echo "exists=true" >> "$GITHUB_OUTPUT"
else
echo "exists=false" >> "$GITHUB_OUTPUT"
fi
- if: steps.registry.outputs.exists != 'true'
run: npm publish --access public
- name: Write release notes
run: node scripts/release-notes.mjs "${GITHUB_REF_NAME#v}" > "${RUNNER_TEMP}/release-notes.md"
- name: Create GitHub release
uses: softprops/action-gh-release@3bb12739c298aeb8a4eeaf626c5b8d85266b0e65 # v2
with:
name: ${{ github.ref_name }}
body_path: ${{ runner.temp }}/release-notes.md