forked from rollkit/rollkit
-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (49 loc) · 1.31 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
# Tests / Code Coverage workflow
# This workflow is triggered by ci_release.yml workflow
name: Tests / Code Coverage
on:
workflow_call:
inputs:
go-version:
description: "Go version to use"
type: string
required: true
jobs:
go_mod_tidy_check:
name: Go Mod Tidy Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: ${{ inputs.go-version }}
- run: go mod tidy
- name: check for diff
run: git diff --exit-code
unit_test:
name: Run Unit Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: set up go
uses: actions/setup-go@v5
with:
go-version: ${{ inputs.go-version }}
- name: Run unit test
run: make test
- name: upload coverage report
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage.txt
integration_test:
name: Run Integration Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: set up go
uses: actions/setup-go@v5
with:
go-version: ${{ inputs.go-version }}
- name: Integration Tests
run: echo "No integration tests yet"