-
-
Notifications
You must be signed in to change notification settings - Fork 34
50 lines (47 loc) · 1.49 KB
/
e2e.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
name: 🧪 End To End (e2e) Tests Workflow
on:
push:
branches: [ main ]
pull_request:
branches: [ main, develop ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
e2e-tests:
runs-on: ubuntu-latest
steps:
- name: 🛒 Checkout
uses: actions/checkout@v2
- name: 🧱 Hugo build
uses: jakejarvis/hugo-build-action@master
with:
args: --gc --config ./config.toml -b http://localhost:1313
- name: 🕸️ Run server
run: |
cd public && python -m http.server 1313 &
- name: 🐍 Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: 👨👩👧 Install dependencies
working-directory: ./test
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: 🧭 Ensure browsers are installed
run: python -m playwright install --with-deps
- name: 🧪 Run your tests
working-directory: ./test
run: pytest --base-url http://localhost:1313 -v --junitxml report.xml e2e/*
- name: 📷 Save screenshots
uses: actions/upload-artifact@v2
with:
name: screenshots
path: test/screenshots/
- name: 📖 Publish Test Report
uses: dorny/test-reporter@v1
if: always()
with:
name: E2E Tests
path: './test/report.xml'
reporter: java-junit