-
-
Notifications
You must be signed in to change notification settings - Fork 34
52 lines (41 loc) · 1.16 KB
/
tests.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
name: Tests
on:
push:
pull_request:
jobs:
build:
strategy:
matrix:
go-version:
- "1.21"
- "1.22"
- "1.23"
platform: [ubuntu-latest]
runs-on: ${{ matrix.platform }}
steps:
- name: Setup env
run: |
echo "GOPATH=$GITHUB_WORKSPACE" >> $GITHUB_ENV
echo "CURRENT_WORKSPACE=$GITHUB_WORKSPACE/src/github.com/${{ github.repository }}" >> $GITHUB_ENV
echo "$GITHUB_WORKSPACE/bin" >> $GITHUB_PATH
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
- name: Check out code into the Go module directory
uses: actions/checkout@v4
with:
path: ${{ env.CURRENT_WORKSPACE }}
- name: Get dependencies
run: go get -v ./...
working-directory: ${{ env.CURRENT_WORKSPACE }}
- name: Run go vet
run: go vet ./...
working-directory: ${{ env.CURRENT_WORKSPACE }}
- name: Run tests
run: ./test.sh
working-directory: ${{ env.CURRENT_WORKSPACE }}
- uses: codecov/codecov-action@v5
with:
files: ${{ env.CURRENT_WORKSPACE }}/coverage.txt
verbose: true