|
1 | | -name: pgpm tests |
| 1 | +name: pgpm unit tests |
2 | 2 | on: |
3 | 3 | push: |
| 4 | + pull_request: |
4 | 5 | workflow_dispatch: |
5 | 6 |
|
6 | 7 | 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 | | - |
80 | 8 | test: |
81 | | - needs: setup |
82 | 9 | runs-on: ubuntu-latest |
83 | 10 | container: pyramation/node-sqitch:20.12.0 |
84 | 11 | continue-on-error: true |
@@ -176,75 +103,3 @@ jobs: |
176 | 103 | - name: Test ${{ matrix.package }} |
177 | 104 | run: cd ./packages/${{ matrix.package }} && pnpm test |
178 | 105 |
|
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 | | - |
0 commit comments