-
Notifications
You must be signed in to change notification settings - Fork 23
91 lines (72 loc) · 2.29 KB
/
ci-statics.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
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
name: Node.js - E2E, Unit Tests, Lint (for PR)
on:
pull_request:
types: [opened, synchronize, reopened]
# Trigger when PR is created and/or head of branch is updated.
paths:
- "static_report/**"
- "piperider_cli/**"
# Trigger when diffs detected in statics source code
branches:
- main
# Only PR target is `main`
jobs:
build:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./static_report
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: 16
- uses: pnpm/[email protected]
with:
version: 7
- name: Install dependencies
working-directory: ./static_report
run: pnpm install --frozen-lockfile
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Prepare Piperider Data & E2E Builds (2+1 runs; 1+1 comparison)
working-directory: .
run: |
pip install -r requirements.txt
which piperider
piperider version
bash static_report/src/sdlc/generate-e2e-data.sh first
cd static_report
pnpm run embed:html e2e
pnpm run bundle:e2e
cd ..
bash static_report/src/sdlc/generate-e2e-data.sh second
cd static_report
pnpm run embed:html e2e
pnpm run bundle:e2e:case
cd ..
zip -r reports.zip ./static_report/build
- name: Cypress run (E2E)
# Parallelization only for cypress dashboard https://www.cypress.io/pricing/
uses: cypress-io/github-action@v2
with:
install: false
record: false
working-directory: ./static_report
config-file: cypress.config.ts
start: |
pnpm run serve:e2e:norm:single
pnpm run serve:e2e:norm:comparison
pnpm run serve:e2e:case:single-edge
pnpm run serve:e2e:case:comparison-asymmetric
wait-on: 'http://localhost:3000, http://localhost:3001, http://localhost:4000, http://localhost:4001'
- uses: actions/upload-artifact@v3
with:
working-directory: ./static_report
name: report-artifacts
path: reports.zip
- name: Build Apps
run: pnpm run build