Skip to content

Commit 032c41e

Browse files
authored
Merge pull request gitea-group-sync#10 from localleon/actions
Adding Github Actions CI
2 parents 29ccce7 + a310606 commit 032c41e

File tree

1 file changed

+54
-0
lines changed

1 file changed

+54
-0
lines changed

.github/workflows/go.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: Go
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
jobs:
10+
11+
build:
12+
name: Build
13+
runs-on: ubuntu-latest
14+
steps:
15+
16+
- name: Set up Go 1.x
17+
uses: actions/setup-go@v2
18+
with:
19+
go-version: ^1.15
20+
21+
- name: Check out code into the Go module directory
22+
uses: actions/checkout@v2
23+
24+
- name: Get dependencies
25+
run: |
26+
go get -v -t -d ./...
27+
if [ -f Gopkg.toml ]; then
28+
curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
29+
dep ensure
30+
fi
31+
- name: Build
32+
run: go build -v .
33+
34+
- name: Test
35+
run: go test -v .
36+
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+
# Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version.
46+
version: v1.29
47+
48+
# Optional: working directory, useful for monorepos
49+
# working-directory: somedir
50+
51+
args: --disable-all -E bodyclose -E gosimple -E gosec -E govet -E ineffassign -E staticcheck -E structcheck -E typecheck -E varcheck -E errcheck -E golint -E gocritic
52+
53+
# Optional: show only new issues if it's a pull request. The default value is `false`.
54+
# only-new-issues: true

0 commit comments

Comments
 (0)