-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (36 loc) · 1 KB
/
frontend.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
name: frontend
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
lint-and-tests:
runs-on: ubuntu-latest
env:
DIRECTORY: ./frontend
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Use Node.js 20
uses: actions/setup-node@v4
with:
node-version: 20.x
- name: Install dependencies
working-directory: ${{ env.DIRECTORY }}
run: npm ci
- name: Run format
working-directory: ${{ env.DIRECTORY }}
run: npm run format
- name: Run lint
working-directory: ${{ env.DIRECTORY }}
run: npm run lint
- name: Run tests
working-directory: ${{ env.DIRECTORY }}
run: npm run test:cov
- name: Upload coverage reports to Codecov
uses: codecov/[email protected]
with:
file: ${{ format('{0}/coverage/clover.xml', env.DIRECTORY) }}
flags: frontend
token: ${{ secrets.CODECOV_TOKEN }}