-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (31 loc) · 899 Bytes
/
ci.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
name: CI
on:
push:
jobs:
ci:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@master
- name: Setup Go
uses: actions/setup-go@v1
with:
go-version: 1.18
- name: Check gofmt
run: test -z "$(gofmt -s -d .)"
- name: Run go vet
run: go vet ./...
- name: Make sure that go.mod has already been tidied
run: go mod tidy && git diff --no-patch --exit-code
- name: Build Runner
run: go build ./cmd/runner
- name: Build Server
run: go build ./cmd/server
- name: Run tests
run: go test -covermode=count -coverprofile=profile.cov ./...
- name: Send coverage
env:
COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
GO111MODULE=off go get github.com/mattn/goveralls
$(go env GOPATH)/bin/goveralls -coverprofile=profile.cov -service=github