Update method to get Playwright's version in workflow

The code to retrieve Playwright's version in the GitHub action workflow has been updated. Previously, it was using `npm ls` but now it has been modified to use `pnpm ls` with the `--filter web-e2e` option. This change will ensure a more accurate retrieval of the Playwright test version specific to web end-to-end testing.
This commit is contained in:
giancarlo
2024-04-11 19:00:47 +08:00
parent 9d8d33121a
commit d3cfa3d8f3

View File

@@ -65,7 +65,7 @@ jobs:
- name: Store Playwright's Version - name: Store Playwright's Version
run: | run: |
PLAYWRIGHT_VERSION=$(npm ls @playwright/test | grep @playwright | sed 's/.*@//') PLAYWRIGHT_VERSION=$(pnpm ls @playwright/test --filter web-e2e | grep @playwright | sed 's/.*@//')
echo "Playwright's Version: $PLAYWRIGHT_VERSION" echo "Playwright's Version: $PLAYWRIGHT_VERSION"
echo "PLAYWRIGHT_VERSION=$PLAYWRIGHT_VERSION" >> $GITHUB_ENV echo "PLAYWRIGHT_VERSION=$PLAYWRIGHT_VERSION" >> $GITHUB_ENV