-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (49 loc) · 1.38 KB
/
playwright.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
name: Playwright Tests
on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:
inputs:
environment:
type: choice
required: true
description: Environment
options:
- STAGING
env:
ENVIRONMENT: ${{ github.event.inputs.environment || 'STAGING' }}
jobs:
test:
timeout-minutes: 10
runs-on: ubuntu-latest
container:
image: mcr.microsoft.com/playwright:v1.45.3-jammy
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 20
- name: Install dependencies
run: npm ci
- name: Environment
run: |
echo "${ENVIRONMENT}"
- name: Run your tests
run: npx playwright test
env:
AUTH_TOKEN: ${{ secrets[format('{0}_TOKEN', env.ENVIRONMENT)] }}
BASE_URL: ${{ vars[format('{0}_BASE_URL', env.ENVIRONMENT)] }}
COOKIE_DOMAIN: ${{ vars[format('{0}_COOKIE_DOMAIN', env.ENVIRONMENT)] }}
ADMIN_URL: ${{ vars[format('{0}_ADMIN_URL', env.ENVIRONMENT)] }}
ADMIN_USERNAME: ${{ secrets[format('{0}_ADMIN_USERNAME', env.ENVIRONMENT)] }}
ADMIN_PASSWORD: ${{ secrets[format('{0}_ADMIN_PASSWORD', env.ENVIRONMENT)] }}
- uses: actions/upload-artifact@v3
if: always()
with:
name: playwright-report
path: playwright-report/
retention-days: 30