-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (34 loc) · 1.01 KB
/
ci.yml
File metadata and controls
43 lines (34 loc) · 1.01 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
name: Tests & Coverage
on:
pull_request:
branches: [ master, main, develop ]
jobs:
tests:
name: Run Tests & Coverage
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.21'
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
cache: 'npm'
cache-dependency-path: frontend/package-lock.json
- name: Install dependencies
run: |
go mod download
cd frontend && npm ci
- name: Run Go tests with coverage
run: go test ./... -v -coverprofile=coverage.out -covermode=atomic
- name: Run frontend tests with coverage
working-directory: ./frontend
run: npm run test:coverage
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
files: ./coverage.out,./frontend/coverage/lcov.info
fail_ci_if_error: false