|
1 | | -name: Run Unit Tests |
| 1 | +name: Unit Tests |
2 | 2 |
|
3 | 3 | on: |
4 | 4 | pull_request: |
5 | 5 | types: [opened, synchronize, reopened] |
6 | 6 |
|
7 | 7 | jobs: |
8 | | - run-tests: |
| 8 | + test: |
9 | 9 | runs-on: ubuntu-latest |
10 | 10 | steps: |
11 | | - - name: Checkout code |
12 | | - uses: actions/checkout@v4 |
13 | | - |
14 | | - - name: Setup pnpm |
15 | | - uses: pnpm/action-setup@v4 |
| 11 | + - uses: actions/checkout@v4 |
| 12 | + - uses: pnpm/action-setup@v4 |
16 | 13 | with: |
17 | | - version: 10.28.0 # or your local pnpm version |
18 | | - |
19 | | - - name: Set up Node.js |
20 | | - uses: actions/setup-node@v4 |
| 14 | + version: 10.28.0 |
| 15 | + - uses: actions/setup-node@v4 |
21 | 16 | with: |
22 | 17 | node-version: '22.x' |
23 | | - cache: 'pnpm' # optional but recommended |
24 | | - |
25 | | - # - name: Temporarily disable contentstack package |
26 | | - # run: mv packages/contentstack/package.json packages/contentstack/package.json.disabled || true |
27 | | - |
28 | | - - name: Install Dependencies (Excluding Contentstack) |
29 | | - run: pnpm install --no-frozen-lockfile |
30 | | - |
31 | | - - name: Build all plugins (Excluding Contentstack) |
32 | | - run: | |
33 | | - NODE_ENV=PREPACK_MODE pnpm -r --sort run build |
34 | | -
|
35 | | - # - name: Restore contentstack package |
36 | | - # run: mv packages/contentstack/package.json.disabled packages/contentstack/package.json || true |
37 | | - |
38 | | - - name: Run tests for Contentstack Command |
| 18 | + cache: 'pnpm' |
| 19 | + - run: pnpm install --no-frozen-lockfile |
| 20 | + - run: pnpm -r --sort --workspace-concurrency=1 run build |
| 21 | + - name: Test contentstack |
| 22 | + working-directory: ./packages/contentstack |
| 23 | + run: pnpm test |
| 24 | + - name: Test contentstack-command |
39 | 25 | working-directory: ./packages/contentstack-command |
40 | | - run: npm run test:unit |
41 | | - |
42 | | - - name: Run tests for Contentstack Config |
| 26 | + run: pnpm test |
| 27 | + - name: Test contentstack-config |
43 | 28 | working-directory: ./packages/contentstack-config |
44 | | - run: npm run test:unit |
45 | | - |
46 | | - - name: Run tests for Contentstack Auth |
| 29 | + run: pnpm test |
| 30 | + - name: Test contentstack-auth |
47 | 31 | working-directory: ./packages/contentstack-auth |
48 | | - run: NODE_ENV=PREPACK_MODE npm run test:unit |
| 32 | + run: pnpm test |
| 33 | + - name: Test contentstack-utilities |
| 34 | + working-directory: ./packages/contentstack-utilities |
| 35 | + run: pnpm test |
0 commit comments