-
Notifications
You must be signed in to change notification settings - Fork 3.8k
126 lines (121 loc) · 4.44 KB
/
Copy pathci-accelerator-benchmark.yaml
File metadata and controls
126 lines (121 loc) · 4.44 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
name: CI accelerator benchmark
on:
workflow_dispatch:
push:
branches:
- workflows-global-build-image
env:
NODE_OPTIONS: --max_old_space_size=6144
permissions:
contents: read
jobs:
baseline:
name: Baseline / ${{ matrix.workload }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
workload:
- lint
- test
steps:
- name: Check out files from GitHub
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
persist-credentials: false
- name: Setup Node and install
uses: ./.github/actions/setup
- name: Check for duplicate dependencies
if: matrix.workload == 'lint'
run: yarn dedupe --check
- name: Build resources
id: build_resources
run: >-
./node_modules/.bin/gulp gen-icons-json build-translations build-locale-data
${{ matrix.workload == 'lint' && 'gather-gallery-pages' || '' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Setup lint cache
if: matrix.workload == 'lint'
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: |
node_modules/.cache/prettier
node_modules/.cache/eslint
node_modules/.cache/typescript
key: lint-${{ github.sha }}
restore-keys: lint-
- name: Run eslint
if: matrix.workload == 'lint'
run: yarn run lint:eslint --quiet
- name: Run tsc
if: matrix.workload == 'lint' && !cancelled() && steps.build_resources.outcome == 'success'
run: yarn run lint:types
- name: Run lit-analyzer
if: matrix.workload == 'lint' && !cancelled() && steps.build_resources.outcome == 'success'
run: yarn run lint:lit --quiet
- name: Run prettier
if: matrix.workload == 'lint' && !cancelled() && steps.build_resources.outcome == 'success'
run: yarn run lint:prettier
- name: Check dependency licenses
if: matrix.workload == 'lint' && !cancelled() && steps.build_resources.outcome == 'success'
run: yarn run lint:licenses
- name: Run tests
if: matrix.workload == 'test'
run: yarn run test
image:
name: Image / ${{ matrix.workload }}
runs-on: ubuntu-latest
container:
image: ghcr.io/timmo001/home-assistant-frontend-ci-images/frontend-workflow@sha256:ffa4d621b4495bf456b7ab3c632f550e329fe78c2d571167aa0899a52c4932c3
strategy:
fail-fast: false
matrix:
workload:
- lint
- test
steps:
- name: Check out files from GitHub
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
persist-credentials: false
- name: Install dependencies
run: frontend-install
- name: Check for duplicate dependencies
if: matrix.workload == 'lint'
run: yarn dedupe --check
- name: Build resources
id: build_resources
run: >-
./node_modules/.bin/gulp gen-icons-json build-translations build-locale-data
${{ matrix.workload == 'lint' && 'gather-gallery-pages' || '' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Setup lint cache
if: matrix.workload == 'lint'
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: |
node_modules/.cache/prettier
node_modules/.cache/eslint
node_modules/.cache/typescript
key: lint-${{ github.sha }}
restore-keys: lint-
- name: Run eslint
if: matrix.workload == 'lint'
run: yarn run lint:eslint --quiet
- name: Run tsc
if: matrix.workload == 'lint' && !cancelled() && steps.build_resources.outcome == 'success'
run: yarn run lint:types
- name: Run lit-analyzer
if: matrix.workload == 'lint' && !cancelled() && steps.build_resources.outcome == 'success'
run: yarn run lint:lit --quiet
- name: Run prettier
if: matrix.workload == 'lint' && !cancelled() && steps.build_resources.outcome == 'success'
run: yarn run lint:prettier
- name: Check dependency licenses
if: matrix.workload == 'lint' && !cancelled() && steps.build_resources.outcome == 'success'
run: yarn run lint:licenses
- name: Run tests
if: matrix.workload == 'test'
run: yarn run test