-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (46 loc) · 1.39 KB
/
e2e.yaml
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
name: E2E Tests
on:
push:
branches:
- main
schedule:
- cron: '0 11 * * *' # Runs every day at 11:00 UTC (6:00 AM EST)
jobs:
setup:
uses: ./.github/workflows/setup-workspace.yaml
test:
name: E2E Tests
timeout-minutes: 30
runs-on: ubuntu-latest
needs: setup
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Setup Job
uses: ./.github/actions/setup-job
- name: Install Playwright Browsers
shell: bash
run: pnpm run postinstall:setup-playwright
- name: Run E2E Tests
shell: bash
env:
# Inject app secrets like API keys here from github secrets
ABORT_DELAY: 5000
APP_NAME: Example App
run: |
# @UPDATE - Normally would not be needed but we have no test environment in this template. Remove this section for actual apps
sudo echo "127.0.0.1 local.example-test.com" | sudo tee -a /etc/hosts
pnpm run postinstall:setup-cert
# ---- #
if [ "${{ github.event_name }}" == "schedule" ]; then
pnpm run test:e2e:test
else
pnpm run test:e2e:local
fi
- name: Upload E2E Report
uses: actions/upload-artifact@v4
if: ${{ !cancelled() }}
with:
name: playwright-report
path: playwright-report/
retention-days: 30