-
Notifications
You must be signed in to change notification settings - Fork 598
46 lines (40 loc) · 1.18 KB
/
build.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
name: build
on: [push, pull_request]
env:
GO111MODULE: on
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
jobs:
build:
name: Build
runs-on: ubuntu-latest
strategy:
fail-fast: true
max-parallel: 2
matrix:
go: ["stable", "oldstable"]
steps:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: ${{matrix.go}}
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v4
- name: Lint code
uses: golangci/golangci-lint-action@v4
with:
only-new-issues: true
- name: Test
run: |
go test -race -count=1 -coverprofile=queue.coverprofile ./queue
go test -race -count=1 -coverprofile=server.coverprofile ./server
go test -race -count=1 -coverprofile=main.coverprofile
- name: Upload coverage to codecov
run: |
go install github.com/modocache/[email protected]
echo "" > coverage.txt
gover
cat gover.coverprofile >> coverage.txt
bash <(curl -s https://codecov.io/bash)
- name: Build
run: go build -v .