Skip to content

Commit

Permalink
Test GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
typeofweb committed Nov 24, 2023
1 parent e508592 commit afc3949
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
name: Build, TypeScripts, tests
on: deployment_status
name: Build, TypeScript, tests
on:
pull_request:
types: [opened, reopened, synchronize]
issue_comment:
types: [created, edited]

concurrency:
group: tests-${{ github.event.pull_request.number || github.ref }}
group: tests-${{ github.event.pull_request.number || github.event.issue.number || github.ref }}
cancel-in-progress: true

jobs:
build_and_test:
if: ${{ github.event.deployment_status.state == 'success' }}
if: ${{ github.event.issue.pull_request && contains(github.event.comment.body , '✅ Ready') }}

runs-on: ubuntu-latest
env:
Expand Down Expand Up @@ -51,18 +55,15 @@ jobs:
- run: pnpm exec playwright install-deps chromium
if: steps.playwright-cache.outputs.cache-hit == 'true'

- name: Wait for Vercel Preview
uses: patrickedqvist/[email protected]
id: waitForVercel
- uses: aaimio/[email protected]
id: vercel_preview_url
with:
token: ${{ secrets.GITHUB_TOKEN }}
max_timeout: 240
check_interval: 5
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Run Playwright tests
run: pnpm exec playwright test
env:
BASE_URL: ${{ steps.waitForVercel.outputs.url }}
BASE_URL: ${{ steps.vercel_preview_url.outputs.vercel_preview_url }}

- uses: actions/upload-artifact@v3
if: always()
Expand Down

0 comments on commit afc3949

Please sign in to comment.