Skip to content

Commit 967ff72

Browse files
committed
Migrate from Travis CI to GitHub Actions
Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
1 parent 7665b25 commit 967ff72

File tree

4 files changed

+58
-52
lines changed

4 files changed

+58
-52
lines changed

.gitattributes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# gofmt always uses LF, whereas Git uses CRLF on Windows.
2+
*.go text eol=lf

.github/workflows/ci.yaml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Go
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
build:
7+
runs-on: ${{ matrix.os }}
8+
9+
strategy:
10+
matrix:
11+
os: [ ubuntu-latest, macos-latest, windows-latest ]
12+
fail-fast: false
13+
14+
steps:
15+
- uses: actions/checkout@v2
16+
17+
- name: Set up Go
18+
uses: actions/setup-go@v2
19+
with:
20+
go-version: 1.17
21+
22+
- name: Setup gotestsum
23+
uses: autero1/action-gotestsum@v1.0.0
24+
with:
25+
gotestsum_version: 1.7.0
26+
27+
- name: Test
28+
run: gotestsum --format short-verbose -- -race -timeout=20m -coverprofile=coverage_txt -covermode=atomic ./...
29+
30+
- uses: codecov/codecov-action@v2
31+
with:
32+
files: coverage_txt
33+
34+
lint:
35+
runs-on: ${{ matrix.os }}
36+
37+
strategy:
38+
matrix:
39+
os: [ ubuntu-latest, macos-latest, windows-latest ]
40+
fail-fast: false
41+
42+
steps:
43+
- uses: actions/checkout@v2
44+
- uses: golangci/golangci-lint-action@v2
45+
with:
46+
args: --timeout=5m

.golangci.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,13 @@ linters:
4040
- godot
4141
- tparallel
4242
- paralleltest
43+
- cyclop # because we have gocyclo already
44+
# TODO: review the linters below. We disabled them to make the CI pass first.
45+
- gocritic
46+
- revive
47+
- containedctx
48+
- ireturn
49+
- varnamelen
50+
- forcetypeassert
51+
- thelper
52+
- wastedassign

.travis.yml

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

0 commit comments

Comments
 (0)