Skip to content

Commit

Permalink
fix(github): overrides backstopjs docker entrypoint to ensure playwri…
Browse files Browse the repository at this point in the history
…ght is installed
  • Loading branch information
dgrebb committed Nov 26, 2023
1 parent dbf2098 commit 0a3cbc3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/docker-sanity-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ jobs:
echo "IMAGE_NAME_LC=${IMAGE_NAME,,}" >>${GITHUB_ENV}
echo "TAG=${name/\//-}" >> $GITHUB_ENV
echo "PV=$(cat package.json | jq -r '.version')" >> $GITHUB_ENV
echo "PLAYWRIGHT_VERSION=$(cat package.json | jq -r '.dependencies.playwright')" >> $GITHUB_ENV
- name: Log in to the Container registry
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
Expand Down Expand Up @@ -69,4 +70,4 @@ jobs:
- name: 🎭 Playwright Sanity
run: |
cd test/configs/ && docker run --rm -t --mount type=bind,source="$(pwd)",target=/src $REGISTRY/$IMAGE_NAME_LC:$TAG test --config=playwright
cd test/configs/ && docker run --rm -t --entrypoint='' --mount type=bind,source="$(pwd)",target=/src $REGISTRY/$IMAGE_NAME_LC:$TAG sh -c "npm -g config set user root && chmod -R 777 /root && chmod -R 777 /opt/pw-browsers && npm i -D playwright && npx --allow-root --yes playwright@$PLAYWRIGHT_VERSION install && backstop test --config=playwright"
2 changes: 1 addition & 1 deletion .github/workflows/docker-smoke-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,4 +71,4 @@ jobs:
- name: 🎭 Playwright Smoke
continue-on-error: true
run: |
cd test/configs/ && docker run --rm -t --mount type=bind,source="$(pwd)",target=/src $REGISTRY/$IMAGE_NAME_LC:$TAG test --config=backstop_features_pw
cd test/configs/ && docker run --rm -t -e PLAYWRIGHT_BROWSERS_PATH="/ms-playwright" --entrypoint='' --mount type=bind,source="$(pwd)",target=/src $REGISTRY/$IMAGE_NAME_LC:$TAG bash npx install playwright && backstop test --config=backstop_features_pw

0 comments on commit 0a3cbc3

Please sign in to comment.