From 25df429d41409694f84ee7e8f8f0b181ed7bcd6d Mon Sep 17 00:00:00 2001 From: Tim Shamilov Date: Sun, 3 Dec 2023 00:53:06 -0500 Subject: [PATCH] cleaner parallel config --- .github/workflows/tests-ci.yml | 15 +++++++++++---- package.json | 6 +----- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/.github/workflows/tests-ci.yml b/.github/workflows/tests-ci.yml index fe8be2f70..97037d43c 100644 --- a/.github/workflows/tests-ci.yml +++ b/.github/workflows/tests-ci.yml @@ -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 @@ -131,8 +135,11 @@ 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: | @@ -140,7 +147,7 @@ jobs: 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 diff --git a/package.json b/package.json index c2268811b..67eab9456 100644 --- a/package.json +++ b/package.json @@ -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",