-
Notifications
You must be signed in to change notification settings - Fork 36
56 lines (46 loc) · 1.36 KB
/
test.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
name: Run integration tests
on:
# Runs when a push is made the main branch
push:
branches: [ "main" ]
# Runs when a PR is targeting the main branch
pull_request:
branches: [ "main" ]
# Manual activation
workflow_dispatch:
jobs:
go_test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [ 18 ]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup pnpm
uses: pnpm/action-setup@v2
with:
version: 8.x
- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: "pnpm"
cache-dependency-path: ui/pnpm-lock.yaml
- name: Build UI Dashboard
run: pnpm --dir=./ui install && pnpm --dir=./ui build
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: ">=1.21.3"
- name: Tidy modules
run: go mod tidy
- name: Run tests
run: go test -v -coverprofile coverage.csv ./...
- name: Create coverage report
run: go tool cover -html=coverage.csv -o coverage.html
- name: Upload coverage report
uses: actions/upload-artifact@v3
with:
name: coverage.html
path: coverage.html