Adds support for running CI on github actions. (#132)
This commit is contained in:
parent
82b40a53f0
commit
49877b7d41
1 changed files with 25 additions and 0 deletions
25
.github/main.yml
vendored
Normal file
25
.github/main.yml
vendored
Normal file
|
@ -0,0 +1,25 @@
|
|||
name: CI
|
||||
|
||||
on: [push]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Setup Go for use with actions
|
||||
uses: actions/setup-go@v2
|
||||
with:
|
||||
go-version: 1.16
|
||||
- name: Install goimports
|
||||
run: go get golang.org/x/tools/cmd/goimports
|
||||
- name: Set env with list of directories in repo containin go code
|
||||
run: echo GO_USR_DIRS=$(go list -f {{.Dir}} ./... | grep -E -v "/gen-go/|/vendor/") >> $GITHUB_ENV
|
||||
- name: Run goimports check
|
||||
run: test -z "`for d in $GO_USR_DIRS; do goimports -d $d/*.go | tee /dev/stderr; done`"
|
||||
- name: Create aurora/mesos docker cluster
|
||||
run: docker-compose up -d
|
||||
- name: Run tests
|
||||
run: go test -timeout 35m -race -coverprofile=coverage.txt -covermode=atomic -v github.com/paypal/gorealis
|
Loading…
Add table
Add a link
Reference in a new issue