Skip to content

ci-e2e

ci-e2e #346

Workflow file for this run

name: ci-e2e
on:
deployment_status:
env:
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: ${{ vars.TURBO_TEAM }}
jobs:
setup-job:
if: github.event.deployment_status.state == 'success'
runs-on: ubuntu-latest
timeout-minutes: 10
outputs:
BASE_REF_BRANCH: ${{ steps.branch-name.outputs.BASE_REF_BRANCH }}
steps:
- id: branch-name
env:
GH_TOKEN: ${{ github.token }}
run: |
BASE_REF_BRANCH=$(gh api -H "Accept: application/vnd.github+json" /repos/${{ github.repository_owner }}/${{ github.event.repository.name }}/commits/${{ github.sha }}/branches-where-head | jq -r '.[].name')
echo "BASE_REF_BRANCH=$BASE_REF_BRANCH" >> $GITHUB_OUTPUT
e2e:
if: github.event.deployment_status.state == 'success'
needs: setup-job
runs-on: ubuntu-latest
timeout-minutes: 10
permissions:
contents: read
container:
image: mcr.microsoft.com/playwright:v1.49.1-noble@sha256:70e367e0cbf60340a5b5fd562f6247a34eb3196efab9f88a3dd56482d9fe09d2
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- uses: MH4GF/shared-config/.github/composite-actions/setup-pnpm@main
- run: pnpm test:playwright
env:
BASE_URL: ${{ github.event.deployment_status.environment_url }}
- uses: lost-pixel/lost-pixel@41055d71dea42eb5fa5c27dabd2a90722f376e33 # v3.22.0
env:
LOST_PIXEL_API_KEY: ${{ secrets.LOST_PIXEL_API_KEY }}
COMMIT_REF_NAME: ${{ needs.setup-job.outputs.BASE_REF_BRANCH }}
- uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4
if: failure()
with:
name: test-results
path: test-results/