Skip to content

Commit

Permalink
add parallelism
Browse files Browse the repository at this point in the history
  • Loading branch information
shamilovtim committed Dec 3, 2023
1 parent 06adfba commit a8c334f
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 10 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/tests-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,9 @@ jobs:
test-with-browsers:
# Run browser tests using macOS so that WebKit tests don't fail under a Linux environment
runs-on: macos-latest
strategy:
matrix:
group: ['a', 'b']
steps:
- name: Checkout source
uses: actions/checkout@v4
Expand Down Expand Up @@ -127,16 +130,16 @@ jobs:
path: ~/Library/Caches/ms-playwright
key: ${{ runner.os }}-playwright-${{ env.PLAYWRIGHT_VERSION }}

- name: Build browser bundles
run: npm run build build:browser --ws
- name: Build browser bundles for matrix ${{ matrix.group }})
run: npm run ci:build:browser:matrix:${{ matrix.group }}

- 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 all packages
run: npm run test:browser --ws
- name: Run tests for matrix ${{ matrix.group }}
run: npm run ci:test:browser:matrix:${{ matrix.group }}

- name: Terminate dwn-server
run: kill $DWN_SERVER_BACKGROUND_PROCESS || true
Expand Down
19 changes: 13 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,26 @@
"private": true,
"type": "module",
"workspaces": [
"packages/agent",
"packages/api",
"packages/common",
"packages/credentials",
"packages/crypto",
"packages/dids",
"packages/credentials",
"packages/agent",
"packages/user-agent",
"packages/identity-agent",
"packages/proxy-agent",
"packages/api",
"packages/identity-agent"
"packages/user-agent"
],
"scripts": {
"clean": "npx npkill -d $(pwd) -t node_modules && npx npkill -d $(pwd)/packages -t dist",
"build": "npm run build --ws"
"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:build:browser:matrix:a": "npm run build:browser --workspace packages/agent",
"ci:build:browser:matrix:b": "npm run build: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",
"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"
},
"repository": {
"type": "git",
Expand Down

0 comments on commit a8c334f

Please sign in to comment.