Debian Codegraph @

.github/workflows/ci.yml

raw
1 name: CI
2
3 # Because "push" also shows up on PRs, we don't need to do both.
4 on: [push]
5
6 jobs:
7 build-1_13:
8 name: Build (Go 1.13)
9 runs-on: ubuntu-latest
10
11 steps:
12 - name: Set up Go
13 uses: actions/setup-go@v2
14 with:
15 go-version: '~1.13.5'
16
17 - name: Check out code
18 uses: actions/checkout@v2
19 with:
20 submodules: true
21
22 - name: Clean up extra files
23 run: rm ./_testcases/*.go
24
25 - name: Download deps
26 run: go mod download
27
28 - name: Run tests
29 run: go test -race -v ./...
30
31 build-latest:
32 name: Build (Latest)
33 runs-on: ubuntu-latest
34
35 steps:
36 - name: Set up Go
37 uses: actions/setup-go@v2
38 with:
39 go-version: '~1.19'
40
41 - name: Check out code
42 uses: actions/checkout@v2
43 with:
44 submodules: true
45
46 - name: Clean up extra files
47 run: rm ./_testcases/*.go
48
49 - name: Download deps
50 run: go mod download
51
52 - name: Run tests
53 run: go test -covermode=atomic -coverprofile=profile.cov -race -v ./...
54
55 - name: Submit coverage report
56 env:
57 COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
58 run: |
59 GO111MODULE=off go get github.com/mattn/goveralls
60 $(go env GOPATH)/bin/goveralls -coverprofile=profile.cov -service=github
61
62 lint:
63 name: golangci-lint
64 runs-on: ubuntu-latest
65
66 steps:
67 - name: Check out code
68 uses: actions/checkout@v2
69
70 - name: Run golangci-lint
71 uses: golangci/golangci-lint-action@v2
72 with:
73 version: 'v1.49.0'