Skip to content

Commit

Permalink
cleaner parallel config
Browse files Browse the repository at this point in the history
  • Loading branch information
shamilovtim committed Dec 3, 2023
1 parent c0a3bb2 commit 25df429
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
15 changes: 11 additions & 4 deletions .github/workflows/tests-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,11 @@ jobs:
runs-on: macos-latest
strategy:
matrix:
group: ['a', 'b']
include:
- group: "A"
packages: "--workspace packages/agent --workspace packages/dids"
- group: "B"
packages: "--workspace packages/api --workspace packages/common --workspace packages/credentials --workspace packages/crypto --workspace packages/identity-agent --workspace packages/proxy-agent --workspace packages/user-agent"
steps:
- name: Checkout source
uses: actions/checkout@v4
Expand Down Expand Up @@ -131,16 +135,19 @@ jobs:
path: ~/Library/Caches/ms-playwright
key: ${{ runner.os }}-playwright-${{ env.PLAYWRIGHT_VERSION }}

- name: Build all workspace packages
run: npm run build
- name: Build esm for matrix ${{ matrix.group }}
run: npm run build:esm ${{ matrix.packages }}

- name: Build browser for matrix ${{ matrix.group }}
run: npm run build:browser ${{ matrix.packages }}

- name: Run dwn-server (background)
run: |
node node_modules/@web5/dwn-server/dist/esm/src/main.js &
echo "DWN_SERVER_BACKGROUND_PROCESS=$!" >> $GITHUB_ENV
- name: Run tests for matrix ${{ matrix.group }}
run: npm run ci:test:browser:matrix:${{ matrix.group }}
run: npm run test:browser ${{ matrix.packages }}

- name: Terminate dwn-server
run: kill $DWN_SERVER_BACKGROUND_PROCESS || true
Expand Down
6 changes: 1 addition & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,7 @@
"scripts": {
"clean": "npx npkill -d $(pwd) -t node_modules && npx npkill -d $(pwd)/packages -t dist",
"build": "npm run build --ws",
"test:browser": "npm run test:browser --ws",
"test:node": "npm run test:node --ws",
"dwn-server":"node node_modules/@web5/dwn-server/dist/esm/src/main.js || true",
"ci:test:browser:matrix:a": "npm run test:browser --workspace packages/agent",
"ci:test:browser:matrix:b": "npm run test:browser --workspace packages/api --workspace packages/common --workspace packages/credentials --workspace packages/crypto --workspace packages/dids --workspace packages/identity-agent --workspace packages/proxy-agent --workspace packages/user-agent"
"dwn-server":"node node_modules/@web5/dwn-server/dist/esm/src/main.js || true"
},
"repository": {
"type": "git",
Expand Down

0 comments on commit 25df429

Please sign in to comment.