Skip to content

Commit

Permalink
adding github playwright yml
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremieflrnt committed Dec 2, 2023
1 parent b621463 commit 49c7f2b
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 1 deletion.
35 changes: 35 additions & 0 deletions .github/workflows/playwright.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Playwright Tests
on:
push:
branches: [main, master, feat/github-actions-playwright]
pull_request:
branches: [main, master]
jobs:
test:
timeout-minutes: 60
runs-on: ubuntu-latest
container:
image: mcr.microsoft.com/playwright:v1.39.0-jammy
defaults:
run:
working-directory: ./playwright
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
- name: Install dependencies
run: npm ci
- name: Install Playwright
run: PLAYWRIGHT_BROWSERS_PATH=0 npx playwright install --with-deps
- name: Run your tests
run: npx playwright test
env:
HOME: /root
ENVIRONMENT: production
- uses: actions/upload-artifact@v3
if: always()
with:
name: out-report
path: out/report/
retention-days: 30
2 changes: 1 addition & 1 deletion playwright/playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import fs from 'fs';
import { PW_AUTH_FILE } from './tests/auth.setup';

const getBaseUrl = (): string => {
return process.env.ENVIRONMENT === 'production' ? 'https://beleffort.vercel.app' : 'http://localhost:3000';
return process.env.ENVIRONMENT === 'production' ? 'https://beleffort.app' : 'http://localhost:3000';
};

const getReportersList = (): ReporterDescription[] => {
Expand Down

0 comments on commit 49c7f2b

Please sign in to comment.