Skip to content

Commit

Permalink
Add workflow file to run playwright
Browse files Browse the repository at this point in the history
  • Loading branch information
sora32127 committed Apr 17, 2024
1 parent 52a3716 commit 5669bc3
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/playwright-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name : Playwright E2E Test
on:
pull_request:
branches: ['main']

jobs:
wait_for_vercel:
runs-on: ubuntu-latest
outputs:
preview_url: ${{ steps.waitForVercelPreviewDeployment.outputs.url }}
steps:
- name : Waiting for Vercel Preview Deployment to be ready
uses : patrickedqvist/[email protected]
with :
token: ${{ secrets.SECRET_GITHUB_TOKEN }}
max_timeout: 600
playwright_test:
runs-on: ubuntu-latest
needs: wait_for_vercel
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: '18' # 本番環境と同じバージョンを指定
- name: Install dependencies
run: npm install
- name: Run Playwright tests
run: npx playwright test
env:
TEST_URL: ${{ needs.wait_for_vercel.outputs.preview_url }}

0 comments on commit 5669bc3

Please sign in to comment.