-
Notifications
You must be signed in to change notification settings - Fork 0
104 lines (89 loc) · 2.53 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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
---
name: Default Pipeline
on:
pull_request:
push:
branches:
- "main"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
jobs:
build-examples:
name: Build example
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
example:
[
angular17-example,
react-example,
vue-example,
]
steps:
- name: ⬇ Checkout repo
uses: actions/checkout@v4
- 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@v4
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.49.0
steps:
- name: ⬇ Checkout repo
uses: actions/checkout@v4
- name: ⬇ Download build angular
uses: actions/download-artifact@v4
with:
name: angular17-example
path: ./build/angular17-example
- name: ⬇ Download build react
uses: actions/download-artifact@v4
with:
name: react-example
path: ./build/react-example
- name: ⬇ Download build vue
uses: actions/download-artifact@v4
with:
name: vue-example
path: ./build/vue-example
- 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@v4
with:
name: playwright-report
path: ./e2e/playwright-report
retention-days: 30
- name: 🆙 Upload test results
if: failure()
uses: actions/upload-artifact@v4
with:
name: playwright-results
path: ./e2e/test-results
retention-days: 30