-
Notifications
You must be signed in to change notification settings - Fork 0
75 lines (75 loc) · 2.91 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
name: Playwright Tests
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]
jobs:
test:
timeout-minutes: 60
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
- name: Setup pnpm
uses: pnpm/action-setup@v2
with:
version: 8
- name: Setup Elixir
uses: erlef/setup-beam@v1
with:
version-file: .tool-versions
version-type: strict
- name: Cache Elixir Deps/Build
uses: actions/cache@v3
with:
path: |
deps
_build
assets/node_modules
key: elixir-deps-${{ runner.os }}-${{ hashFiles('mix.lock') }}-${{ hashFiles('.tool-versions') }}-${{ hashFiles('assets/pnpm-lock.yaml') }}-${{ hashFiles('lib/**/*.ex', 'lib/**/*.*ex', 'config/*.exs', 'mix.exs') }}
restore-keys: |
elixir-deps-${{ runner.os }}-${{ hashFiles('mix.lock') }}-
elixir-deps-${{ runner.os }}
- name: Run setup
run: MIX_ENV=e2e mix setup
- name: Cache E2E deps
uses: actions/cache@v3
with:
path: test/e2e/node_modules
key: e2e-deps-${{ runner.os }}-${{ hashFiles('test/e2e/package.json') }}-${{ hashFiles('test/e2e/pnpm-lock.yaml') }}
restore-keys: |
e2e-deps-${{ runner.os }}-${{ hashFiles('test/e2e/package.json') }}-${{ hashFiles('test/e2e/pnpm-lock.yaml') }}
e2e-deps-${{ runner.os }}-${{ hashFiles('test/e2e/package.json') }}-
e2e-deps-${{ runner.os }}
- name: Run e2e setup
run: |
cd test/e2e
pnpm install
pnpm exec playwright install --with-deps
- name: Run Playwright tests
working-directory: test/e2e
run: pnpm test
env:
AUTH0_DOMAIN: ${{ secrets.AUTH0_DOMAIN }}
AUTH0_CLIENT_ID: ${{ secrets.AUTH0_CLIENT_ID }}
AUTH0_CLIENT_SECRET: ${{ secrets.AUTH0_CLIENT_SECRET }}
AUTH0_MANAGEMENT_CLIENT_ID: ${{ secrets.AUTH0_MANAGEMENT_CLIENT_ID }}
AUTH0_MANAGEMENT_CLIENT_SECRET: ${{ secrets.AUTH0_MANAGEMENT_CLIENT_SECRET }}
STRIPE_SECRET: ${{ secrets.STRIPE_SECRET }}
STRIPE_CONNECT_CLIENT_ID: ${{ secrets.STRIPE_CONNECT_CLIENT_ID }}
STRIPE_PRICE_ID: ${{ secrets.STRIPE_PRICE_ID }}
E2E_USER_ID: ${{ secrets.E2E_USER_ID }}
E2E_USER_EMAIL: ${{ secrets.E2E_USER_EMAIL }}
E2E_USER_PASSWORD: ${{ secrets.E2E_USER_PASSWORD }}
E2E_PHOTOGRAPHER_ID: ${{ secrets.E2E_PHOTOGRAPHER_ID }}
E2E_PHOTOGRAPHER_EMAIL: ${{ secrets.E2E_PHOTOGRAPHER_EMAIL }}
E2E_PHOTOGRAPHER_PASSWORD: ${{ secrets.E2E_PHOTOGRAPHER_PASSWORD }}
- uses: actions/upload-artifact@v3
if: always()
with:
name: playwright-report
path: test/e2e/playwright-report/
retention-days: 30