-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (33 loc) · 977 Bytes
/
actions.yaml
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
name: Go package
on: [push]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
go-version: ['1.19.x']
steps:
# setup actions matrix
- uses: actions/checkout@v3
- name: Setup Go ${{matrix.go-version}}
uses: actions/setup-go@v3
with:
go-version: ${{matrix.go-version}}
cache: true
# show version & install dependencies
- name: Show Go version & Install dependencies
run: |
go version
go get .
# build Go application
- name: Build
run: go build -v ./...
# test Go application
- name: Test with Go
run: go test -v ./... -json > TestResults-${{matrix.go-version}}.json
# upload Go test results
- name: Upload Go test results
uses: actions/upload-artifact@v3
with:
name: Go-results-${{matrix.go-version}}
path: TestResults-${{matrix.go-version}}.json