diff --git a/.github/workflows/tests-ci.yml b/.github/workflows/tests-ci.yml index 531edd1ea..b2fb69bdb 100644 --- a/.github/workflows/tests-ci.yml +++ b/.github/workflows/tests-ci.yml @@ -67,7 +67,9 @@ jobs: run: npm run lint --ws - name: Run dwn-server (background) - run: node node_modules/@web5/dwn-server/dist/esm/src/main.js & + 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:node --ws -- --color @@ -75,7 +77,7 @@ jobs: TEST_DWN_URL: http://localhost:3000 - name: Terminate dwn-server - run: kill $(jobs -p) + run: kill $DWN_SERVER_BACKGROUND_PROCESS || true - name: Upload test coverage to Codecov uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d # v3.1.4 @@ -129,13 +131,15 @@ jobs: run: npm run build - name: Run dwn-server (background) - run: node node_modules/@web5/dwn-server/dist/esm/src/main.js & + 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: Terminate dwn-server - run: kill $(jobs -p) + run: kill $DWN_SERVER_BACKGROUND_PROCESS || true web5-spec: runs-on: ubuntu-latest