-
-
Notifications
You must be signed in to change notification settings - Fork 50
68 lines (55 loc) · 1.81 KB
/
verify.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
name: Verify
on: [pull_request]
concurrency:
group: verify-${{ github.head_ref }}
cancel-in-progress: true
jobs:
build:
name: Build
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x, 20.x]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'yarn'
- name: Get cache settings
id: cache-settings
run: |
fbToolsVersion=$(yarn info firebase-tools --json --name-only | sed 's/.*@npm\://g' | sed 's/"$//')
echo "firebase-tools version $fbToolsVersion"
echo "firebase-tools=$fbToolsVersion" >> $GITHUB_OUTPUT
- name: Cache Firebase Emulator Binaries
uses: actions/cache@v4
with:
path: ~/.cache/firebase/emulators
key: ${{ runner.os }}-${{ matrix.node-version }}-firebase-${{ steps.cache-settings.outputs.firebase-tools }}
- name: Install Dependencies
run: yarn install --immutable
- name: Check For Lint
run: yarn lint
- name: Check Formatting
run: yarn format:check
- name: Run Unit Tests + Coverage
run: yarn test:cov
- name: Upload Test Coverage
uses: codecov/codecov-action@v4
if: matrix.node-version == '20.x'
with:
fail_ci_if_error: false
token: ${{ secrets.CODECOV_TOKEN }}
- name: Run Build
run: yarn build
- name: Size Check
uses: andresz1/size-limit-action@v1
if: matrix.node-version == '20.x'
env:
CI_JOB_NUMBER: 1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
skip_step: install # Skip install since it happens above