Skip to content

Commit 9fc3f37

Browse files
committed
Migrate CI to github workflow
Signed-off-by: Youyuan Wu <[email protected]>
1 parent a6d82e4 commit 9fc3f37

File tree

4 files changed

+50
-30
lines changed

4 files changed

+50
-30
lines changed

.gitattributes

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.go text eol=lf

.github/workflows/ci.yaml

+46
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.1
21+
22+
- name: Setup gotestsum
23+
uses: autero1/[email protected]
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

+3
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,6 @@ linters:
4141
- errorlint
4242
- paralleltest
4343
- tparallel
44+
- cyclop
45+
- errname
46+
- varnamelen

.travis.yml

-30
This file was deleted.

0 commit comments

Comments
 (0)