Main -> Next #2257
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: UI-Tests | |
on: | |
pull_request: | |
branches: [main, next] | |
jobs: | |
wait_for_preview: | |
name: Wait for netlify-preview | |
runs-on: ubuntu-latest | |
outputs: | |
preview_url: ${{ steps.waitForNetlifyPreviewDeployment.outputs.url }} | |
steps: | |
- name: Wait for Pages changed to neutral | |
uses: fountainhead/[email protected] | |
id: wait-for-Netlify | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
ref: ${{ github.event.pull_request.head.sha || github.sha }} | |
checkName: 'Pages changed' | |
- name: Wait for preview-deployment | |
uses: archiewood/wait-for-netlify-action@v1 | |
id: waitForNetlifyPreviewDeployment | |
with: | |
site_name: evidence-development-workspace | |
max_timeout: 500 | |
check_interval: 5 | |
tests: | |
name: UI Tests | |
needs: wait_for_preview | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repo | |
uses: actions/checkout@v3 | |
with: | |
ref: ${{ github.event.pull_request.head.sha }} | |
- uses: pnpm/[email protected] | |
with: | |
version: 8.6.9 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 16.x | |
cache: pnpm | |
- run: pnpm install --frozen-lockfile && cd ./tests && npx playwright install --with-deps && pnpm run test:ui | |
env: | |
BASE_URL: ${{ needs.wait_for_preview.outputs.preview_url }} |