Skip to content

Commit 5e02ff0

Browse files
committed
workflows
1 parent 76daa89 commit 5e02ff0

2 files changed

Lines changed: 80 additions & 147 deletions

File tree

.github/workflows/ci.yml

Lines changed: 2 additions & 147 deletions
Original file line numberDiff line numberDiff line change
@@ -1,84 +1,11 @@
1-
name: pgpm tests
1+
name: pgpm unit tests
22
on:
33
push:
4+
pull_request:
45
workflow_dispatch:
56

67
jobs:
7-
setup:
8-
runs-on: ubuntu-latest
9-
container: pyramation/node-sqitch:20.12.0
10-
11-
env:
12-
PGHOST: pg_db
13-
PGPORT: 5432
14-
PGUSER: postgres
15-
PGPASSWORD: password
16-
17-
services:
18-
pg_db:
19-
image: pyramation/pgvector:13.3-alpine
20-
env:
21-
POSTGRES_USER: postgres
22-
POSTGRES_PASSWORD: password
23-
options: >-
24-
--health-cmd pg_isready
25-
--health-interval 10s
26-
--health-timeout 5s
27-
--health-retries 5
28-
ports:
29-
- 5432:5432
30-
31-
minio_cdn:
32-
image: minio/minio:edge-cicd
33-
env:
34-
MINIO_ROOT_USER: minioadmin
35-
MINIO_ROOT_PASSWORD: minioadmin
36-
ports:
37-
- 9000:9000
38-
- 9001:9001
39-
options: >-
40-
--health-cmd "curl -f http://localhost:9000/minio/health/live || exit 1"
41-
--health-interval 10s
42-
--health-timeout 5s
43-
--health-retries 5
44-
45-
steps:
46-
- name: Configure Git (for tests)
47-
run: |
48-
git config --global user.name "CI Test User"
49-
git config --global user.email "ci@example.com"
50-
51-
- name: Checkout
52-
uses: actions/checkout@v4
53-
54-
- name: Enable corepack and pnpm
55-
run: |
56-
corepack enable
57-
corepack prepare pnpm@9 --activate
58-
pnpm -v
59-
node -v
60-
61-
- name: Install
62-
run: pnpm install
63-
64-
- name: Install pgpm CLI globally
65-
run: npm install -g pgpm@0.2.0
66-
67-
- name: Build
68-
run: pnpm -r build
69-
70-
- name: Seed app_user
71-
run: |
72-
pgpm admin-users bootstrap --yes
73-
pgpm admin-users add --test --yes
74-
env:
75-
PGHOST: pg_db
76-
PGPORT: 5432
77-
PGUSER: postgres
78-
PGPASSWORD: password
79-
808
test:
81-
needs: setup
829
runs-on: ubuntu-latest
8310
container: pyramation/node-sqitch:20.12.0
8411
continue-on-error: true
@@ -176,75 +103,3 @@ jobs:
176103
- name: Test ${{ matrix.package }}
177104
run: cd ./packages/${{ matrix.package }} && pnpm test
178105

179-
integration-test:
180-
needs: setup
181-
runs-on: ubuntu-latest
182-
container: pyramation/node-sqitch:20.12.0
183-
184-
env:
185-
PGHOST: pg_db
186-
PGPORT: 5432
187-
PGUSER: postgres
188-
PGPASSWORD: password
189-
190-
services:
191-
pg_db:
192-
image: pyramation/pgvector:13.3-alpine
193-
env:
194-
POSTGRES_USER: postgres
195-
POSTGRES_PASSWORD: password
196-
options: >-
197-
--health-cmd pg_isready
198-
--health-interval 10s
199-
--health-timeout 5s
200-
--health-retries 5
201-
ports:
202-
- 5432:5432
203-
204-
minio_cdn:
205-
image: minio/minio:edge-cicd
206-
env:
207-
MINIO_ROOT_USER: minioadmin
208-
MINIO_ROOT_PASSWORD: minioadmin
209-
ports:
210-
- 9000:9000
211-
- 9001:9001
212-
options: >-
213-
--health-cmd "curl -f http://localhost:9000/minio/health/live || exit 1"
214-
--health-interval 10s
215-
--health-timeout 5s
216-
--health-retries 5
217-
218-
steps:
219-
- name: Configure Git (for tests)
220-
run: |
221-
git config --global user.name "CI Test User"
222-
git config --global user.email "ci@example.com"
223-
224-
- name: Checkout
225-
uses: actions/checkout@v4
226-
227-
- name: Enable corepack and pnpm
228-
run: |
229-
corepack enable
230-
corepack prepare pnpm@9 --activate
231-
pnpm -v
232-
node -v
233-
234-
- name: Install
235-
run: pnpm install
236-
237-
- name: Install pgpm CLI globally
238-
run: npm install -g pgpm@0.2.0
239-
240-
- name: Build
241-
run: pnpm -r build
242-
243-
- name: Seed app_user
244-
run: |
245-
pgpm admin-users bootstrap --yes
246-
pgpm admin-users add --test --yes
247-
248-
- name: Run Integration Tests
249-
run: ./scripts/test-all-packages.js
250-
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
name: pgpm integration tests
2+
on:
3+
push:
4+
pull_request:
5+
workflow_dispatch:
6+
7+
jobs:
8+
integration-test:
9+
runs-on: ubuntu-latest
10+
container: pyramation/node-sqitch:20.12.0
11+
12+
env:
13+
PGHOST: pg_db
14+
PGPORT: 5432
15+
PGUSER: postgres
16+
PGPASSWORD: password
17+
18+
services:
19+
pg_db:
20+
image: pyramation/pgvector:13.3-alpine
21+
env:
22+
POSTGRES_USER: postgres
23+
POSTGRES_PASSWORD: password
24+
options: >-
25+
--health-cmd pg_isready
26+
--health-interval 10s
27+
--health-timeout 5s
28+
--health-retries 5
29+
ports:
30+
- 5432:5432
31+
32+
minio_cdn:
33+
image: minio/minio:edge-cicd
34+
env:
35+
MINIO_ROOT_USER: minioadmin
36+
MINIO_ROOT_PASSWORD: minioadmin
37+
ports:
38+
- 9000:9000
39+
- 9001:9001
40+
options: >-
41+
--health-cmd "curl -f http://localhost:9000/minio/health/live || exit 1"
42+
--health-interval 10s
43+
--health-timeout 5s
44+
--health-retries 5
45+
46+
steps:
47+
- name: Configure Git (for tests)
48+
run: |
49+
git config --global user.name "CI Test User"
50+
git config --global user.email "ci@example.com"
51+
52+
- name: Checkout
53+
uses: actions/checkout@v4
54+
55+
- name: Enable corepack and pnpm
56+
run: |
57+
corepack enable
58+
corepack prepare pnpm@9 --activate
59+
pnpm -v
60+
node -v
61+
62+
- name: Install
63+
run: pnpm install
64+
65+
- name: Install pgpm CLI globally
66+
run: npm install -g pgpm@0.2.0
67+
68+
- name: Build
69+
run: pnpm -r build
70+
71+
- name: Seed app_user
72+
run: |
73+
pgpm admin-users bootstrap --yes
74+
pgpm admin-users add --test --yes
75+
76+
- name: Run Integration Tests
77+
run: ./scripts/test-all-packages.js
78+

0 commit comments

Comments
 (0)