-
-
Notifications
You must be signed in to change notification settings - Fork 42
37 lines (34 loc) · 947 Bytes
/
test.yml
File metadata and controls
37 lines (34 loc) · 947 Bytes
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
name: test
on:
pull_request:
push:
branches:
- main
jobs:
functions:
runs-on: ubuntu-latest
env:
working-directory: functions/
steps:
- name: Checkout repo
uses: actions/checkout@v6
- name: Setup node
uses: actions/setup-node@v6
with:
node-version: 20
- name: Install dependencies
run: npm install
working-directory: ${{ env.working-directory }}
- name: Check code formatting
run: npx prettier --check "**/*.{js,ts,jsx,tsx}"
working-directory: ${{ env.working-directory }}
- name: Run tests with coverage
run: npm run test:coverage
working-directory: ${{ env.working-directory }}
- name: Run lint
run: npm run lint
working-directory: ${{ env.working-directory }}
- uses: codecov/codecov-action@v5
name: "Upload Code Coverage"
with:
files: ${{ env.working-directory }}/coverage/lcov.info