diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 568f9dde93..8b73006e79 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -70,9 +70,15 @@ jobs: steps: - uses: actions/checkout@v2 - # E2E runs inside docker and doesn't need any node dependencies + # E2E tests run inside docker container and don't need installed deps, + # but we still need to use `pnpm ls` to determine what the specific + # version of playwright being used in pnpm-lock.yaml is + - uses: pnpm/action-setup@v2.0.1 + with: + version: 6.30.1 + - name: Run E2E - run: PLAYWRIGHT_VERSION=1.17.1 TEST_TYPE=e2e docker-compose -f docker-compose.playwright.yml up --abort-on-container-exit --exit-code-from playwright + run: ./bin/playwright.sh storybook: name: Check Storybook build diff --git a/bin/playwright.sh b/bin/playwright.sh new file mode 100755 index 0000000000..25c13465a6 --- /dev/null +++ b/bin/playwright.sh @@ -0,0 +1,8 @@ +#! /bin/bash' + +# todo: find a way to make this portable for Windows users so it can be used for the package.json script + +export PLAYWRIGHT_VERSION=$(pnpm ls --dev --depth=0 | grep playwright | awk '{print $2}') +TEST_TYPE=$1 docker-compose -f docker-compose.playwright.yml up \ + --abort-on-container-exit \ + --exit-code-from playwright