Skip to content

Commit

Permalink
build: Run PlayWright against successful deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
iliubinskii committed Jul 8, 2024
1 parent 96a669b commit e900a19
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 7 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
name: Lint
name: Linters
on:
push:
branches: [ develop, main, master ]
pull_request:
branches: [ develop, main, master ]
workflow_dispatch:
jobs:
test:
lint:
timeout-minutes: 60
runs-on: ubuntu-latest
steps:
Expand Down
25 changes: 20 additions & 5 deletions .github/workflows/playwright.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,32 @@
name: Playwright Tests
name: Deploy and Test
on:
push:
branches: [ develop ]
branches: [ develop, main, master ]
pull_request:
branches: [ main, master ]
branches: [ develop, main, master ]
workflow_dispatch:
jobs:
deploy:
runs-on: ubuntu-latest
outputs:
url: ${{ steps.deploy.outputs.preview-url }}
steps:
- uses: actions/checkout@v2
- name: Deploy to Vercel
id: deploy
uses: amondnet/vercel-action@v25
with:
vercel-token: ${{ secrets.VERCEL_TOKEN }}
vercel-org-id: ${{ vars.VERCEL_ORG_ID }}
vercel-project-id: ${{ vars.VERCEL_PROJECT_ID }}
vercel-args: ${{ github.ref == 'refs/heads/master' && '--prod' || '' }}
test:
timeout-minutes: 60
needs: deploy
runs-on: ubuntu-latest
timeout-minutes: 60
environment: preview
env:
BASE_URL: ${{ vars.BASE_URL }}
BASE_URL: ${{ needs.deploy.outputs.url }}
JWT_ADMIN_EMAIL: ${{ secrets.JWT_ADMIN_EMAIL }}
JWT_EMAIL: ${{ secrets.JWT_EMAIL }}
JWT_SECRET: ${{ secrets.JWT_SECRET }}
Expand Down

0 comments on commit e900a19

Please sign in to comment.