-
Notifications
You must be signed in to change notification settings - Fork 10
97 lines (79 loc) · 3.1 KB
/
ci.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
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
name: CI
on:
push:
branches: [master]
pull_request:
branches: [master]
merge_group:
branches: [master]
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
container: telefonica/web-builder:chromium93.0.4577-1.2.4
steps:
- uses: actions/checkout@v4
- name: Install dependencies
env:
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: 'true'
run: yarn install --immutable --immutable-cache
- run: yarn lint
- run: yarn prettier-check
- run: yarn circular-dependencies
- run: yarn build
- run: yarn ts-check
- run: yarn test --ci
- run: NO_BUILD=true yarn test-ssr --ci
- uses: actions/upload-artifact@v4
if: always()
with:
name: failed-screenshots-ssr
path: src/**/__diff_output__/*-diff.png
build-acceptance:
runs-on: ubuntu-latest
container: telefonica/web-builder:chromium93.0.4577-1.2.4
strategy:
matrix:
shard: [1, 2, 3]
fail-fast: false
steps:
- uses: actions/checkout@v4
- name: Install dependencies
env:
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: 'true'
run: yarn install --immutable --immutable-cache
- run: yarn storybook-static
- run: yarn test-acceptance --ci --shard=${{ matrix.shard }}/${{ strategy.job-total }}
- uses: actions/upload-artifact@v4
if: always()
with:
name: failed-screenshots-${{ matrix.shard }}
path: src/**/__diff_output__/*-diff.png
build-upload-failed-screenshots:
runs-on: ubuntu-latest
container: telefonica/web-builder:chromium93.0.4577-1.2.4
needs: [build, build-acceptance]
if: '!cancelled()'
steps:
- uses: actions/checkout@v4
- name: Install dependencies
env:
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: 'true'
run: yarn install --immutable --immutable-cache
- if: needs.build.result == 'failure' || needs.build-acceptance.result == 'failure'
uses: actions/download-artifact@v4
with:
pattern: failed-screenshots-*
merge-multiple: true
path: src/
- name: 'Upload failed screenshot diffs'
uses: './.github/actions/upload-failed-screenshots'
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
azure-account-name: ${{ secrets.AZURE_ACCOUNT_NAME }}
azure-account-key: ${{ secrets.AZURE_ACCOUNT_KEY }}
###