-
Notifications
You must be signed in to change notification settings - Fork 0
117 lines (103 loc) · 2.66 KB
/
ci.yml
File metadata and controls
117 lines (103 loc) · 2.66 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
name: pgpm unit tests
on:
push:
branches:
- main
pull_request:
workflow_dispatch:
jobs:
test:
runs-on: ubuntu-latest
continue-on-error: true
strategy:
fail-fast: false
matrix:
package:
- verify
- utils
- inflection
- faker
- base32
- totp
- jwt-claims
- encrypted-secrets-table
- encrypted-secrets
- defaults
- measurements
- achievements
- metaschema-schema
- metaschema-modules
- services
- jobs
- database-jobs
- uuid
- types
- stamps
- geotypes
env:
PGHOST: localhost
PGPORT: 5432
PGUSER: postgres
PGPASSWORD: password
PGPM_VERSION: 4.7.4
services:
pg_db:
image: constructiveio/postgres-plus:18
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: password
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
minio_cdn:
image: minio/minio:edge-cicd
env:
MINIO_ROOT_USER: minioadmin
MINIO_ROOT_PASSWORD: minioadmin
ports:
- 9000:9000
- 9001:9001
options: >-
--health-cmd "curl -f http://localhost:9000/minio/health/live || exit 1"
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- name: Configure Git (for tests)
run: |
git config --global user.name "CI Test User"
git config --global user.email "ci@example.com"
- name: Checkout
uses: actions/checkout@v4
- name: Setup pnpm
uses: pnpm/action-setup@v2
with:
version: 9
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'pnpm'
- name: Install
run: pnpm install
- name: Cache pgpm CLI
id: cache-pgpm
uses: actions/cache@v4
with:
path: ~/.npm
key: pgpm-${{ env.PGPM_VERSION }}
- name: Install pgpm CLI globally
run: npm install -g pgpm@${{ env.PGPM_VERSION }}
- name: Build
run: pnpm -r build
- name: Seed pg and app_user
run: |
pgpm admin-users bootstrap --yes
# optional, but added to avoid concurrent attempts to add user
pgpm admin-users add --test --yes
- name: Test ${{ matrix.package }}
run: cd ./packages/${{ matrix.package }} && pnpm test