-
Notifications
You must be signed in to change notification settings - Fork 0
90 lines (77 loc) · 2.19 KB
/
default.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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
---
name: Default Pipeline
on:
pull_request:
push:
branches:
- "main"
jobs:
cancel-previous:
name: Cancel Previous Runs
runs-on: ubuntu-latest
steps:
- name: 🛑 Cancel Previous Runs
uses: styfle/[email protected]
build-examples:
name: Build example
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
example:
[angular-example, react-example, react-tailwind-example, vue-example]
steps:
- name: ⬇ Checkout repo
uses: actions/checkout@v3
- name: 📥 Download deps
uses: bahmutov/npm-install@v1
with:
working-directory: ./${{ matrix.example }}
- name: 🚋 Get working directory
working-directory: ./${{ matrix.example }}
run: npm run build
- name: ⬆ Upload build
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.example }}
path: ./build/${{ matrix.example }}
test-examples:
name: 🧪 with 🎭
runs-on: ubuntu-latest
needs: [build-examples]
container:
image: mcr.microsoft.com/playwright:v1.32.3-focal
steps:
- name: ⬇ Checkout repo
uses: actions/checkout@v3
- name: ⬇ Download build
uses: actions/download-artifact@v3
with:
path: build
- name: 📥 Download deps
uses: bahmutov/npm-install@v1
with:
working-directory: ./e2e
install-command: npm ci --ignore-scripts
- name: 📲 Install esbuild (binary workaround)
working-directory: ./e2e
run: npm i -D esbuild-linux-64
- name: 👩🔬 Test with Playwright 🎭
working-directory: ./e2e
env:
HOME: /root
run: npm run test
- name: 🆙 Upload playwright-report
if: always()
uses: actions/upload-artifact@v3
with:
name: playwright-report
path: ./e2e/playwright-report
retention-days: 30
- name: 🆙 Upload test results
if: failure()
uses: actions/upload-artifact@v3
with:
name: playwright-results
path: ./e2e/test-results
retention-days: 30