Skip to content

Commit

Permalink
Move from to github workflows from travis
Browse files Browse the repository at this point in the history
  • Loading branch information
adjackura committed May 3, 2021
1 parent 8a9cb69 commit 9692211
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 21 deletions.
57 changes: 57 additions & 0 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Go

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
schedule:
- cron: '0 0 * * 0' # weekly

jobs:

linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.15

- name: Build
run: go build -v ./...

- name: Test
run: go test -v -race $(go list ./... | grep -v /vendor/)

- name: Format
run: |
if [ -n "$(gofmt -l $(go list -f {{.Dir}} ./...| grep -v /vendor/))" ]; then
echo "Go code is not formatted:"
gofmt -d $(go list -f {{.Dir}} ./...| grep -v /vendor/)
exit 1
fi
- name: Vet
run: go vet $(go list ./... | grep -v /vendor/)

windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2

- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.15

- name: Build
run: go build -v ./...

- name: Test
run: go test -v -race $(go list ./... | grep -v /vendor/)

- name: Vet
run: go vet $(go list ./... | grep -v /vendor/)
7 changes: 0 additions & 7 deletions .travis.gofmt.sh

This file was deleted.

14 changes: 0 additions & 14 deletions .travis.yml

This file was deleted.

0 comments on commit 9692211

Please sign in to comment.