Skip to content

ci-e2e

ci-e2e #222

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.48.2-focal@sha256:c37bcb50b237e975f3fe80013ab1b3958946db1b24aba39b52be8b3123b8a3df
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@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4
if: failure()
with:
name: test-results
path: test-results/