wip: set up sanity docker check with composites #75
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Docker Sanity Test Checks | |
on: | |
workflow_dispatch: | |
workflow_call: | |
permissions: | |
actions: write | |
checks: write | |
contents: write | |
pull-requests: write | |
packages: write | |
env: | |
BRANCH_NAME: ${{ github.event.pull_request.head_ref || github.event.pull_request.head.ref_name || github.head_ref || github.ref_name }} | |
NODE_VERSION: 20 | |
REGISTRY: ghcr.io | |
IMAGE_NAME: ${{ github.repository }} | |
jobs: | |
sanity-test-puppeteer: | |
name: 🤪 Puppeteer | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
- uses: actions/checkout | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 1 | |
ref: ${{ github.event.pull_request.head.sha || github.ref }} | |
- name: "Setup Node, npm Cache, and Install" | |
uses: ./.github/actions/setup-base | |
- uses: ./.github/actions/prepare-docker | |
- name: "𓋏 Run `backstop test` in Docker" | |
continue-on-error: true | |
shell: bash | |
working-directory: ${{ steps.base.outputs.WORKSPACE_ROOT }} | |
run: | | |
set +e | |
cd test/configs/ && docker run --rm -t --mount type=bind,source="$(pwd)",target=/src $REGISTRY/$IMAGE_NAME_LC:$TAG test | |
- name: "Validate Puppeteer Docker Test Results" | |
uses: ./actions/.github/actions/sanity-test-checks | |
with: | |
WORKSPACE_ROOT: ${{ steps.base.outputs.WORKSPACE_ROOT }} | |
RUNNER: "Puppeteer" | |
FIXTURE: "sanity-test-docker.json" | |
sanity-test-playwright: | |
name: 🤪 Playwright | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 1 | |
ref: ${{ github.event.pull_request.head.sha || github.ref }} | |
- name: "Setup Node, npm Cache, and Install" | |
uses: ./.github/actions/setup-base | |
- uses: ./.github/actions/prepare-docker | |
- name: "🎭 Run `backstop test --confg=playwright` in Docker" | |
continue-on-error: true | |
run: | | |
set +e | |
cd test/configs/ && docker run --rm -t --entrypoint='' --mount type=bind,source="$(pwd)",target=/src $REGISTRY/$IMAGE_NAME_LC:$TAG sh -c "chmod -R 777 /root && chmod -R 777 /opt/pw-browsers && npm --verbose --foreground-scripts i -D playwright && npx --verbose --foreground-scripts --yes playwright@$PLAYWRIGHT_VERSION install && backstop test --config=playwright" | |
- name: "Validate Playwright Docker Test Results" | |
uses: ./actions/.github/actions/sanity-test-checks | |
with: | |
WORKSPACE_ROOT: ${{ steps.base.outputs.WORKSPACE_ROOT }} | |
RUNNER: "Playwright" | |
FIXTURE: "sanity-test-playwright-docker.json" |