Skip to content

Commit

Permalink
Use GitHub workflows
Browse files Browse the repository at this point in the history
Switch from Travis to GitHub Workflows for CI.
  • Loading branch information
abhinav committed May 6, 2021
1 parent 520752c commit 0b65632
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 26 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Go

on:
push:
branches: ['*']
tags: ['v*']
pull_request:
branches: ['*']

jobs:

build:
runs-on: ubuntu-latest
strategy:
matrix:
go: ["1.15.x", "1.16.x"]
include:
- go: 1.16.x
latest: true

steps:
- name: Setup Go
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go }}

- name: Checkout code
uses: actions/checkout@v2

- name: Load cached dependencies
uses: actions/cache@v1
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Download Dependencies
run: go mod download

- name: Lint
if: matrix.latest
run: make lint

- name: Test
run: make cover

- name: Upload coverage to codecov.io
uses: codecov/codecov-action@v1
23 changes: 0 additions & 23 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,5 @@ lint: gofmt golint staticcheck

.PHONY: cover
cover:
go test -coverprofile=cover.out -coverpkg=./... -v ./...
go test -race -coverprofile=cover.out -coverpkg=./... -v ./...
go tool cover -html=cover.out -o cover.html
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Released under the [MIT License].
[MIT License]: LICENSE.txt
[doc-img]: https://pkg.go.dev/badge/go.uber.org/multierr
[doc]: https://pkg.go.dev/go.uber.org/multierr
[ci-img]: https://travis-ci.com/uber-go/multierr.svg?branch=master
[ci-img]: https://github.com/uber-go/multierr/actions/workflows/go.yml/badge.svg
[cov-img]: https://codecov.io/gh/uber-go/multierr/branch/master/graph/badge.svg
[ci]: https://travis-ci.com/uber-go/multierr
[ci]: https://github.com/uber-go/multierr/actions/workflows/go.yml
[cov]: https://codecov.io/gh/uber-go/multierr

0 comments on commit 0b65632

Please sign in to comment.