From 0451952d3c68be1d178161a61e4d108473fa719c Mon Sep 17 00:00:00 2001 From: Tim Shamilov Date: Tue, 20 Feb 2024 22:01:55 -0500 Subject: [PATCH] fix filters --- .github/workflows/tests-ci.yml | 10 +++++----- CONTRIBUTING.md | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/tests-ci.yml b/.github/workflows/tests-ci.yml index 95e76fb09..c844ca3f6 100644 --- a/.github/workflows/tests-ci.yml +++ b/.github/workflows/tests-ci.yml @@ -115,11 +115,11 @@ jobs: matrix: include: - group: "A" - packages: "--filter packages/agent" + packages: "--filter agent" - group: "B" - packages: "--filter packages/credentials --filter packages/crypto --filter packages/dids --filter packages/proxy-agent --filter packages/identity-agent --filter packages/user-agent" + packages: "--filter credentials --filter crypto --filter dids --filter proxy-agent --filter identity-agent --filter user-agent" - group: "C" - packages: "--filter packages/api --filter packages/common" + packages: "--filter api --filter common" steps: - name: Checkout source uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 #v4.1.1 @@ -143,7 +143,7 @@ jobs: - name: Get Playwright Version (for cache) id: get-playwright-version run: | - PLAYWRIGHT_VERSION=$(pnpm --filter ./packages/agent ls @playwright/test | grep '@playwright/test' | awk 'NR==1{print $2}') + PLAYWRIGHT_VERSION=$(pnpm --filter agent ls @playwright/test | grep '@playwright/test' | awk 'NR==1{print $2}') echo "Playwright Version: $PLAYWRIGHT_VERSION" echo "PLAYWRIGHT_VERSION=$PLAYWRIGHT_VERSION" >> $GITHUB_ENV @@ -170,7 +170,7 @@ jobs: echo "DWN_SERVER_BACKGROUND_PROCESS=$!" >> $GITHUB_ENV - name: Run tests for matrix ${{ matrix.group }} - run: pnpm test:browser ${{ matrix.packages }} + run: pnpm ${{ matrix.packages }} test:browser - name: Terminate dwn-server run: kill $DWN_SERVER_BACKGROUND_PROCESS || true diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 0b27d5f83..1ac5cd22f 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -112,7 +112,7 @@ to your valuable work: - This is run via CI whenever a pull request is opened, or a commit is pushed to a branch that has an open PR - Running the `pnpm --recursive test:browser` command from the root of the project will run the tests in a browser environment - Please make sure there are no failing tests before switching your PR to ready for review! We hope to have this automated via a github action very soon. -- You can also run `pnpm test:node --filter=packages/DIR` or `pnpm test:browser --filter=packages/DIR` from the root of the project to run tests for a single package. For example, to run the tests only for the `web5` package run `pnpm test:node --filter=packages/web5`. +- You can also run `pnpm --filter=PACKAGE test:node` or `pnpm --filter=PACKAGE test:browser` from the root of the project to run tests for a single package. For example, to run the tests only for the `web5` package run `pnpm --filter=web5 test:node`. ### Test Coverage Expectations