Skip to content

Commit 49a12ed

Browse files
authored
Switch from Travis to GitHub Actions (#340)
Switch from Travis to GitHub Actions
1 parent 5457038 commit 49a12ed

File tree

13 files changed

+158
-3
lines changed

13 files changed

+158
-3
lines changed

.github/workflows/go.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Run Tests
2+
on:
3+
push:
4+
branches:
5+
- master
6+
pull_request:
7+
branches:
8+
- master
9+
10+
jobs:
11+
test:
12+
runs-on: ubuntu-latest
13+
strategy:
14+
matrix:
15+
go: [ '1.17', '1.15', '1.14', '1.13' ]
16+
name: Go ${{ matrix.go }} tests
17+
steps:
18+
- uses: actions/checkout@v2
19+
- name: Setup Go
20+
uses: actions/setup-go@v2
21+
with:
22+
go-version: ${{ matrix.go }}
23+
- name: Install dependencies
24+
run: |
25+
go get -t -d -v ./...
26+
go get github.com/onsi/ginkgo/ginkgo
27+
go get -u golang.org/x/lint/golint
28+
go get -u github.com/modocache/gover
29+
go get -u github.com/mattn/goveralls
30+
- name: Run tests
31+
run: |
32+
ginkgo -r -cover --randomizeAllSpecs --randomizeSuites --failOnPending --trace --race --progress
33+
ginkgo -tags=gorillamux -r --randomizeSuites --failOnPending --trace --race
34+
ginkgo -tags=gingonic -r --randomizeSuites --failOnPending --trace --race
35+
ginkgo -tags=echo -r --randomizeSuites --failOnPending --trace --race
36+
rm examples/examples.coverprofile
37+
bash scripts/fmtpolice
38+
gover
39+
goveralls -coverprofile=gover.coverprofile -repotoken gY90SprlNRGmSMl7MgybLreYa05wUXJTU
40+

echo_router_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
//go:build echo && !gingonic && !gorillamux
12
// +build echo,!gingonic,!gorillamux
23

34
package api2go

gingonic_router_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
//go:build gingonic && !gorillamux && !echo
12
// +build gingonic,!gorillamux,!echo
23

34
package api2go

go.mod

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,13 @@ require (
99
github.com/julienschmidt/httprouter v1.3.0
1010
github.com/labstack/echo v3.3.10+incompatible
1111
github.com/labstack/gommon v0.3.0 // indirect
12-
github.com/onsi/ginkgo v1.12.0
13-
github.com/onsi/gomega v1.9.0
14-
golang.org/x/crypto v0.0.0-20200403201458-baeed622b8d8 // indirect
12+
github.com/mattn/goveralls v0.0.11 // indirect
13+
github.com/modocache/gover v0.0.0-20171022184752-b58185e213c5 // indirect
14+
github.com/onsi/ginkgo v1.16.5
15+
github.com/onsi/gomega v1.10.1
16+
golang.org/x/lint v0.0.0-20210508222113-6edffad5e616 // indirect
17+
golang.org/x/mod v0.5.1 // indirect
18+
golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d // indirect
19+
golang.org/x/tools v0.1.7 // indirect
1520
gopkg.in/guregu/null.v3 v3.4.0
1621
)

go.sum

Lines changed: 100 additions & 0 deletions
Large diffs are not rendered by default.

gorillamux_router_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
//go:build !gingonic && !echo && gorillamux
12
// +build !gingonic,!echo,gorillamux
23

34
package api2go

httprouter_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
//go:build !gingonic && !gorillamux && !echo
12
// +build !gingonic,!gorillamux,!echo
23

34
package api2go

routing/echo.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
//go:build echo && !gorillamux && !gingonic
12
// +build echo,!gorillamux,!gingonic
23

34
package routing

routing/echo_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
//go:build echo && !gingonic && !gorillamux
12
// +build echo,!gingonic,!gorillamux
23

34
package routing_test

routing/gingonic.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
//go:build gingonic && !gorillamux && !echo
12
// +build gingonic,!gorillamux,!echo
23

34
package routing

0 commit comments

Comments
 (0)