-
-
Notifications
You must be signed in to change notification settings - Fork 34
52 lines (46 loc) · 1.44 KB
/
playwright-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
51
52
name: 🧪 Playwright 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: 🛠️ Setup Hugo
uses: peaceiris/actions-hugo@v3
with:
hugo-version: 'latest' # We will be alerted if our code has deprecated functions
extended: true
- name: 🧱 Hugo build
run: hugo --gc --config ./config.toml -b http://127.0.0.1:1313
- name: 🕸️ Run server
run: |
cd public && python -m http.server 1313 &
- name: Test hugo endpoint
run: |
curl -v http://127.0.0.1:1313
if [ $? -ne 0 ]; then
echo "Curl command failed"
exit 1
fi
- name: 👨👩👧 Install playwright dependencies
working-directory: playwright/ci-test
run: |
npm install
npm ci
npx playwright install --with-deps
- name: ⚡️ Run Playwright tests
working-directory: playwright/ci-test
run: npx playwright test
- uses: actions/upload-artifact@v3
if: always()
with:
name: playwright-report
path: playwright/ci-test/playwright-report/
retention-days: 30