Skip to content

Commit

Permalink
Switch from Travis to GitHub Actions (#940)
Browse files Browse the repository at this point in the history
We're deprecating use of Travis for our OSS projects, so switch to
GitHub Actions for it.

Unfortunately, this required dropping tests we had against ppc64le
because [GitHub Workflows doesn't support it][1].

  [1]: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#github-hosted-runners
  • Loading branch information
shirchen authored and abhinav committed May 25, 2021
1 parent 15dca18 commit 9a9e13f
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
@@ -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
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 9a9e13f

Please sign in to comment.