Repository navigation
98 lines (85 loc) · 2.43 KB
/
Copy pathci.yml
File metadata and controls
98 lines (85 loc) · 2.43 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: CI
on:
pull_request:
push:
branches: [develop, main]
workflow_call:
permissions:
contents: read
jobs:
package-platform:
name: package (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- name: Checkout repository
uses: actions/checkout@v7
- name: Setup Node
uses: actions/setup-node@v7
with:
node-version: "lts/*"
cache: npm
- name: Install dependencies
run: npm ci
- name: Format check
run: npm run fmt -- --check
- name: Run package gate
run: npm run check
- name: Upload implementation coverage
if: always()
uses: actions/upload-artifact@v7
with:
name: orm-coverage-${{ matrix.os }}
path: coverage
if-no-files-found: warn
package:
needs: package-platform
if: always()
runs-on: ubuntu-latest
steps:
- name: Require every platform package gate
env:
PACKAGE_RESULT: ${{ needs.package-platform.result }}
run: test "$PACKAGE_RESULT" = success
postgres-contract:
name: PostgreSQL ${{ matrix.postgres }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
postgres: ["16", "17", "18"]
services:
postgres:
image: postgres:${{ matrix.postgres }}
env:
POSTGRES_PASSWORD: postgres
POSTGRES_DB: askr_orm_test
ports:
- 5432:5432
options: >-
--health-cmd "pg_isready -U postgres"
--health-interval 5s
--health-timeout 5s
--health-retries 10
env:
ASKR_ORM_TEST_DATABASE_URL: postgresql://postgres:postgres@127.0.0.1:5432/askr_orm_test
ASKR_ORM_TEST_SHADOW_URL: postgresql://postgres:postgres@127.0.0.1:5432/askr_orm_test_shadow
steps:
- name: Checkout repository
uses: actions/checkout@v7
- name: Setup Node
uses: actions/setup-node@v7
with:
node-version: "lts/*"
cache: npm
- name: Install dependencies
run: npm ci
- name: Create isolated scratch database
run: node tests/prepare-postgres.mjs
- name: Run PostgreSQL integration tests
run: npm run test:integration
- name: Qualify installed PostgreSQL generation with minimum peers
run: npm run test:packed