Skip to content

Commit

Permalink
Switch from Travis to GitHub Actions.
Browse files Browse the repository at this point in the history
  • Loading branch information
shirchen committed May 12, 2021
1 parent 7b21229 commit 3087fe0
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 30 deletions.
52 changes: 52 additions & 0 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
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

- name: Benchmark
run: make bench
28 changes: 0 additions & 28 deletions .travis.yml

This file was deleted.

4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,8 @@ pinned in the [benchmarks/go.mod][] file. [↩](#anchor-versions)

[doc-img]: https://pkg.go.dev/badge/go.uber.org/zap
[doc]: https://pkg.go.dev/go.uber.org/zap
[ci-img]: https://travis-ci.com/uber-go/zap.svg?branch=master
[ci]: https://travis-ci.com/uber-go/zap
[ci-img]: https://github.com/uber-go/zap/actions/workflows/go.yml/badge.svg
[ci]: https://github.com/uber-go/zap/actions/workflows/go.yml
[cov-img]: https://codecov.io/gh/uber-go/zap/branch/master/graph/badge.svg
[cov]: https://codecov.io/gh/uber-go/zap
[benchmarking suite]: https://github.com/uber-go/zap/tree/master/benchmarks
Expand Down

0 comments on commit 3087fe0

Please sign in to comment.