This repository has been archived by the owner on Mar 26, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
executable file
·80 lines (60 loc) · 1.7 KB
/
go.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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
name: Go
on:
push:
branches: [ master ]
# Sequence of patterns matched against refs/tags
tags:
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
pull_request:
branches: [ master ]
jobs:
build_and_test:
name: Build and test
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
# go: ['1.11', '1.12', '1.13', '1.14']
go: ['1.20']
#env:
# COVERALLS_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
steps:
- id: go
name: Set up Go
uses: actions/setup-go@v1
with:
go-version: ${{ matrix.go }}
- name: Check out code into the Go module directory
uses: actions/checkout@v2
- name: Build
run: go build -v ./...
- name: Test
run: |
#for GOOS in $(go tool dist list|awk -F'/' '{print $1}'|sort -u); do
# echo -e "\n\nTESTING FOR $GOOS ...\n"
# go test -v -race -coverprofile=profile.cov ./...
#done
go test -v -race -coverprofile=profile.cov ./...
- name: Send coverage
uses: shogo82148/actions-goveralls@v1
with:
path-to-profile: profile.cov
parallel: true
# notifies coveralls that all test jobs are finished
finish-cov:
name: Finish Coverage
needs: build_and_test
runs-on: ubuntu-latest
steps:
- uses: shogo82148/actions-goveralls@v1
with:
parallel-finished: true
do-release:
runs-on: ubuntu-latest
needs: build_and_test
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')