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 4, 2023
1 parent b621463 commit f2fb304
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 1 deletion.
32 changes: 32 additions & 0 deletions .github/workflows/playwright.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
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
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: PLAYWRIGHT_BROWSERS_PATH=node_modules/playwright-core/.local-browsers npx playwright test
env:
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 f2fb304

Please sign in to comment.