Skip to content

Commit 0b65632

Browse files
committed
Use GitHub workflows
Switch from Travis to GitHub Workflows for CI.
1 parent 520752c commit 0b65632

File tree

4 files changed

+52
-26
lines changed

4 files changed

+52
-26
lines changed

.github/workflows/go.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Go
2+
3+
on:
4+
push:
5+
branches: ['*']
6+
tags: ['v*']
7+
pull_request:
8+
branches: ['*']
9+
10+
jobs:
11+
12+
build:
13+
runs-on: ubuntu-latest
14+
strategy:
15+
matrix:
16+
go: ["1.15.x", "1.16.x"]
17+
include:
18+
- go: 1.16.x
19+
latest: true
20+
21+
steps:
22+
- name: Setup Go
23+
uses: actions/setup-go@v2
24+
with:
25+
go-version: ${{ matrix.go }}
26+
27+
- name: Checkout code
28+
uses: actions/checkout@v2
29+
30+
- name: Load cached dependencies
31+
uses: actions/cache@v1
32+
with:
33+
path: ~/go/pkg/mod
34+
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
35+
restore-keys: |
36+
${{ runner.os }}-go-
37+
38+
- name: Download Dependencies
39+
run: go mod download
40+
41+
- name: Lint
42+
if: matrix.latest
43+
run: make lint
44+
45+
- name: Test
46+
run: make cover
47+
48+
- name: Upload coverage to codecov.io
49+
uses: codecov/codecov-action@v1

.travis.yml

Lines changed: 0 additions & 23 deletions
This file was deleted.

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,5 +34,5 @@ lint: gofmt golint staticcheck
3434

3535
.PHONY: cover
3636
cover:
37-
go test -coverprofile=cover.out -coverpkg=./... -v ./...
37+
go test -race -coverprofile=cover.out -coverpkg=./... -v ./...
3838
go tool cover -html=cover.out -o cover.html

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Released under the [MIT License].
1717
[MIT License]: LICENSE.txt
1818
[doc-img]: https://pkg.go.dev/badge/go.uber.org/multierr
1919
[doc]: https://pkg.go.dev/go.uber.org/multierr
20-
[ci-img]: https://travis-ci.com/uber-go/multierr.svg?branch=master
20+
[ci-img]: https://github.com/uber-go/multierr/actions/workflows/go.yml/badge.svg
2121
[cov-img]: https://codecov.io/gh/uber-go/multierr/branch/master/graph/badge.svg
22-
[ci]: https://travis-ci.com/uber-go/multierr
22+
[ci]: https://github.com/uber-go/multierr/actions/workflows/go.yml
2323
[cov]: https://codecov.io/gh/uber-go/multierr

0 commit comments

Comments
 (0)