-
Notifications
You must be signed in to change notification settings - Fork 103
173 lines (143 loc) · 4.07 KB
/
check.yml
File metadata and controls
173 lines (143 loc) · 4.07 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
164
165
166
167
168
169
170
171
172
173
name: Check
on:
pull_request:
push:
branches: [master]
env:
NX_CACHE_DIRECTORY: .nx/cache
permissions:
contents: read
pull-requests: read
jobs:
changes:
runs-on: ubuntu-latest
outputs:
functions: ${{ steps.filter.outputs.functions }}
lib: ${{ steps.filter.outputs.lib }}
proto: ${{ steps.filter.outputs.proto }}
web: ${{ steps.filter.outputs.web }}
steps:
- name: Check out code
uses: actions/checkout@v6
- uses: dorny/paths-filter@v3
id: filter
with:
filters: |
functions:
- 'functions/**'
- 'package*.json'
- 'nx.json'
- '.github/workflows/check.yml'
- '.github/actions/setup/**'
lib:
- 'lib/**'
- 'package*.json'
- 'nx.json'
- '.github/workflows/check.yml'
- '.github/actions/setup/**'
proto:
- 'proto/**'
- 'package*.json'
- 'nx.json'
- '.github/workflows/check.yml'
- '.github/actions/setup/**'
web:
- 'web/**'
- 'package*.json'
- 'nx.json'
- '.github/workflows/check.yml'
- '.github/actions/setup/**'
functions:
needs: changes
if: ${{ needs.changes.outputs.functions == 'true' }}
name: functions
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v6
- name: Set up environment
uses: ./.github/actions/setup
with:
cache-key-suffix: functions
- name: Check formatting
run: pnpm exec nx run functions:format:check
continue-on-error: true
- name: Lint
run: pnpm exec nx lint functions
- name: Build
run: pnpm exec nx build functions
- name: Test
run: pnpm exec nx test functions
lib:
needs: changes
if: ${{ needs.changes.outputs.lib == 'true' }}
name: lib
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v6
- name: Set up environment
uses: ./.github/actions/setup
with:
cache-key-suffix: lib
- name: Check formatting
run: pnpm exec nx run lib:format:check
continue-on-error: true
- name: Lint
run: pnpm exec nx lint lib
- name: Build
run: pnpm exec nx build lib
- name: Test
run: pnpm exec nx test lib
proto:
needs: changes
if: ${{ needs.changes.outputs.proto == 'true' }}
name: proto
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v6
- name: Set up environment
uses: ./.github/actions/setup
with:
cache-key-suffix: proto
- name: Build
run: pnpm exec nx build proto
- name: Lint
run: pnpm exec nx lint proto
web:
needs: changes
if: ${{ needs.changes.outputs.web == 'true' }}
name: web
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v6
- name: Set up environment
uses: ./.github/actions/setup
with:
cache-key-suffix: web
- name: Install Chrome
uses: browser-actions/setup-chrome@v1
id: setup-chrome
with:
chrome-version: stable
- name: Configure Chrome Environment
shell: bash
run: |
echo "CHROME_BIN=${{ steps.setup-chrome.outputs.chrome-path }}" >> $GITHUB_ENV
echo "CHROME_PATH=${{ steps.setup-chrome.outputs.chrome-path }}" >> $GITHUB_ENV
- name: Check formatting
run: pnpm exec nx run web:format:check
continue-on-error: true
- name: Lint
run: pnpm exec nx lint web
continue-on-error: true
- name: Build
run: pnpm exec nx build web
- name: Test
run: pnpm exec nx test web
- name: Update test coverage report
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}