-
Notifications
You must be signed in to change notification settings - Fork 0
163 lines (136 loc) · 4.37 KB
/
Copy pathci.yml
File metadata and controls
163 lines (136 loc) · 4.37 KB
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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
name: CI
on:
push:
branches:
- develop
pull_request:
workflow_dispatch:
inputs:
seed_vr_baselines:
description: 'Seed missing visual-regression baselines for this OS (upload as artifact, does not gate)'
type: boolean
default: false
permissions:
actions: read
contents: read
jobs:
ci:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6.0.2
with:
fetch-depth: 0
- name: Fetch develop branch for nx affected
if: github.ref != 'refs/heads/develop'
run: git fetch origin develop:develop --no-tags
- uses: pnpm/action-setup@v5.0.0
with:
version: 10
- uses: actions/setup-node@v6.4.0
with:
node-version: 22
cache: 'pnpm'
registry-url: https://npm.pkg.github.com
- run: pnpm install --frozen-lockfile
env:
NODE_AUTH_TOKEN: ${{ secrets.GH_PACKAGES_TOKEN }}
- run: pnpm nx affected -t lint
- run: pnpm nx affected -t test
- run: pnpm nx affected -t build
e2e:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6.0.2
with:
fetch-depth: 0
- name: Fetch develop branch for nx affected
if: github.ref != 'refs/heads/develop'
run: git fetch origin develop:develop --no-tags
- uses: pnpm/action-setup@v5.0.0
with:
version: 10
- uses: actions/setup-node@v6.4.0
with:
node-version: 22
cache: 'pnpm'
registry-url: https://npm.pkg.github.com
- run: pnpm install --frozen-lockfile
env:
NODE_AUTH_TOKEN: ${{ secrets.GH_PACKAGES_TOKEN }}
- run: npx playwright install --with-deps chromium
- name: Run e2e
if: ${{ github.event.inputs.seed_vr_baselines != 'true' }}
run: pnpm nx affected -t e2e
- name: Seed missing visual-regression baselines
if: ${{ github.event.inputs.seed_vr_baselines == 'true' }}
# A seeding run writes every absent baseline and reports it as a
# failure by design; the artifact below is the deliverable, so the
# step must not gate.
continue-on-error: true
run: pnpm exec nx run playground-e2e:e2e -- --update-snapshots=missing
- name: Upload visual-regression baselines
if: always()
uses: actions/upload-artifact@v4
with:
name: playground-e2e-vr-baselines
path: apps/playground-e2e/src/parity.spec.ts-snapshots
retention-days: 7
if-no-files-found: ignore
- name: Upload Playwright report
if: always()
uses: actions/upload-artifact@v4
with:
name: playground-e2e-playwright-report
path: dist/.playwright/apps/playground-e2e/playwright-report
retention-days: 7
if-no-files-found: ignore
- name: Upload Playwright test results
if: always()
uses: actions/upload-artifact@v4
with:
name: playground-e2e-test-results
path: dist/.playwright/apps/playground-e2e/test-output
retention-days: 7
if-no-files-found: ignore
template:
needs: ci
runs-on: ubuntu-latest
steps:
- name: Checkout template
uses: actions/checkout@v6.0.2
with:
repository: fireflyframework/firefly-product-template
ref: develop
token: ${{ secrets.GH_PACKAGES_TOKEN }}
- uses: actions/setup-node@v6.4.0
with:
node-version: 22
registry-url: https://npm.pkg.github.com
cache: 'npm'
- name: Install template dependencies
run: npm ci
env:
NODE_AUTH_TOKEN: ${{ secrets.GH_PACKAGES_TOKEN }}
- name: Build template
run: npm run build
showcase:
needs: template
runs-on: ubuntu-latest
steps:
- name: Checkout showcase
uses: actions/checkout@v6.0.2
with:
repository: fireflyframework/firefly-showcase
ref: develop
token: ${{ secrets.GH_PACKAGES_TOKEN }}
- uses: actions/setup-node@v6.4.0
with:
node-version: 22
registry-url: https://npm.pkg.github.com
cache: 'npm'
- name: Install showcase dependencies
run: npm ci
env:
NODE_AUTH_TOKEN: ${{ secrets.GH_PACKAGES_TOKEN }}
- name: Build showcase
run: npm run build