Skip to content

Commit 18184fe

Browse files
committed
tests
1 parent b205e4a commit 18184fe

File tree

1 file changed

+57
-5
lines changed

1 file changed

+57
-5
lines changed

.github/workflows/ci.yml

Lines changed: 57 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ on:
66
workflow_dispatch: {}
77

88
jobs:
9-
run-tests:
9+
build:
1010
runs-on: ubuntu-latest
11-
11+
1212
steps:
1313
- name: Checkout code
1414
uses: actions/checkout@v4
@@ -30,7 +30,59 @@ jobs:
3030
- name: Build packages
3131
run: pnpm build
3232

33-
- name: Run tests
33+
- name: Upload build artifacts
34+
uses: actions/upload-artifact@v4
35+
with:
36+
name: build-artifacts
37+
path: |
38+
packages/*/dist
39+
node_modules
40+
retention-days: 1
41+
42+
test:
43+
needs: build
44+
runs-on: ubuntu-latest
45+
strategy:
46+
fail-fast: false
47+
matrix:
48+
package:
49+
- casing
50+
- cli
51+
- fetch-api-client
52+
- find-pkg
53+
- http-errors
54+
- jsonld-tools
55+
- nested-obj
56+
- node-api-client
57+
- schema-sdk
58+
- schema-typescript
59+
- strfy-js
60+
- template-module
61+
62+
steps:
63+
- name: Checkout code
64+
uses: actions/checkout@v4
65+
66+
- name: Setup pnpm
67+
uses: pnpm/action-setup@v2
68+
with:
69+
version: 10.12.2
70+
71+
- name: Setup Node.js
72+
uses: actions/setup-node@v4
73+
with:
74+
node-version: "20.x"
75+
cache: "pnpm"
76+
77+
- name: Download build artifacts
78+
uses: actions/download-artifact@v4
79+
with:
80+
name: build-artifacts
81+
82+
- name: Install dependencies
83+
run: pnpm install --frozen-lockfile
84+
85+
- name: Run tests for ${{ matrix.package }}
3486
run: |
35-
cd packages/template-module
36-
pnpm test --verbose
87+
cd packages/${{ matrix.package }}
88+
pnpm test --verbose

0 commit comments

Comments
 (0)