1- name : Run Unit Tests
1+ name : Unit Tests
22
33on :
44 pull_request :
55 types : [opened, synchronize, reopened]
66
77jobs :
8- run-tests :
8+ test :
99 runs-on : ubuntu-latest
1010 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
1613 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
2116 with :
2217 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
3925 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
4328 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
4731 working-directory : ./packages/contentstack-auth
48- run : NODE_ENV=PREPACK_MODE npm run test:unit
32+ run : pnpm test
33+ # Commented out in v2-beta production
34+ # - name: Test contentstack-utilities
35+ # working-directory: ./packages/contentstack-utilities
36+ # run: pnpm test
0 commit comments