Skip to content

Commit 7cdad19

Browse files
committed
Add Github Action
Update Github Action Test GH Action Test GH Action Update GH Action Update GH Action Update GH Action Update GH Action Update GH Action Test GH Action Test GH Action Test GH Action Test GH Action Test GH Action Test GH Action Test GH Action Test GH Action Test GH Action Test GH Action Test GH Action Test GH Action Test GH Action Update GH Action Update GH Action Update GH Action Update GH Action
1 parent 9b75bfd commit 7cdad19

File tree

2 files changed

+57
-1
lines changed

2 files changed

+57
-1
lines changed

.github/workflows/test.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: Test
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- master
8+
9+
env:
10+
GO111MODULE: on
11+
12+
jobs:
13+
test:
14+
strategy:
15+
matrix:
16+
go-version: [1.11.13, tip]
17+
fail-fast: false
18+
19+
runs-on: ubuntu-latest
20+
21+
steps:
22+
- name: Setup go
23+
run: |
24+
curl -sL https://raw.githubusercontent.com/maxatome/install-go/v3.0/install-go.pl |
25+
perl - ${{ matrix.go-version }} $HOME/go
26+
27+
- name: Checkout code
28+
uses: actions/checkout@v2
29+
30+
- name: Install dependencies
31+
run: |
32+
go get -u github.com/bradleyfalzon/apicompat/cmd/apicompat
33+
go get -u golang.org/x/lint/golint
34+
35+
- name: Run vet
36+
run: go vet -x ./...
37+
38+
39+
- name: Run golint
40+
run: test -z "$(golint ./...)" -e
41+
42+
- name: Format code
43+
run: test -z "$(gofmt -s -l -w . | tee /dev/stderr)" -e
44+
45+
- name: Run tests
46+
run: |
47+
go test -v ./...
48+
go test -covermode=count -coverprofile=profile.cov
49+
50+
- name: Backward compatibility
51+
run: test -z "$(apicompat -before ${{ github.event.before }} -after ${{ github.event.after}} ./... | tee /dev/stderr)" -e
52+
53+
- name: Send coverage
54+
uses: shogo82148/actions-goveralls@v1
55+
with:
56+
path-to-profile: profile.cov

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module github.com/ahmetb/go-linq/v3
22

3-
go 1.11
3+
go 1.11

0 commit comments

Comments
 (0)