Skip to content

Commit 4c6ba4f

Browse files
authored
Migrate CI to GitHub Actions (#12)
1 parent 064fc27 commit 4c6ba4f

2 files changed

Lines changed: 46 additions & 19 deletions

File tree

.github/workflows/ci.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: ci
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
tags: [ v* ]
7+
pull_request:
8+
branches: [ master ]
9+
10+
jobs:
11+
matrix:
12+
strategy:
13+
matrix:
14+
go-version: [1.15.x, 1.14.x, 1.13.x]
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/setup-go@v2
18+
with:
19+
go-version: ${{ matrix.go-version }}
20+
- uses: actions/checkout@v2
21+
- run: go get -v -t -d ./...
22+
- run: go test -v ./...
23+
coverage:
24+
runs-on: ubuntu-latest
25+
steps:
26+
- name: Coverage on latest 1.x Go
27+
uses: actions/setup-go@v2
28+
with:
29+
go-version: ^1.*
30+
- uses: actions/checkout@v2
31+
- run: go get -v -t -d ./...
32+
- run: go test -v -coverprofile=coverage.out -covermode=count ./...
33+
- uses: codecov/codecov-action@v1
34+
with:
35+
file: ./coverage.out
36+
fail_ci_if_error: true
37+
golangci:
38+
name: lint
39+
runs-on: ubuntu-latest
40+
steps:
41+
- uses: actions/checkout@v2
42+
- name: golangci-lint
43+
uses: golangci/golangci-lint-action@v2
44+
with:
45+
version: v1.34
46+
only-new-issues: true

.travis.yml

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

0 commit comments

Comments
 (0)