Merge branch 'master' of github.com:BattlesnakeOfficial/rules
This commit is contained in:
commit
73085679f6
1 changed files with 7 additions and 6 deletions
|
|
@ -1,6 +1,6 @@
|
||||||
name: CI
|
name: Main
|
||||||
|
|
||||||
on: [push]
|
on: [push, pull_request]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|
||||||
|
|
@ -12,7 +12,7 @@ jobs:
|
||||||
- uses: actions/setup-go@master
|
- uses: actions/setup-go@master
|
||||||
with:
|
with:
|
||||||
go-version: '1.13'
|
go-version: '1.13'
|
||||||
- name: gofmt
|
- name: Run gofmt
|
||||||
run: test -z $(gofmt -l .) || (gofmt -d . && exit 1)
|
run: test -z $(gofmt -l .) || (gofmt -d . && exit 1)
|
||||||
|
|
||||||
lint:
|
lint:
|
||||||
|
|
@ -24,7 +24,7 @@ jobs:
|
||||||
- uses: actions/setup-go@master
|
- uses: actions/setup-go@master
|
||||||
with:
|
with:
|
||||||
go-version: '1.13'
|
go-version: '1.13'
|
||||||
- name: golangci-lint
|
- name: Run golangci-lint
|
||||||
run: |
|
run: |
|
||||||
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s v1.22.2
|
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s v1.22.2
|
||||||
./bin/golangci-lint run -v ./...
|
./bin/golangci-lint run -v ./...
|
||||||
|
|
@ -38,9 +38,10 @@ jobs:
|
||||||
- uses: actions/setup-go@master
|
- uses: actions/setup-go@master
|
||||||
with:
|
with:
|
||||||
go-version: '1.13'
|
go-version: '1.13'
|
||||||
- name: go test
|
- name: Run go test
|
||||||
run: go test -race -coverprofile=coverage.txt ./...
|
run: go test -race -coverprofile=coverage.txt ./...
|
||||||
- name: upload to codecov
|
- name: Upload coverage to codecov.io
|
||||||
|
if: github.event_name == 'push'
|
||||||
uses: codecov/codecov-action@v1
|
uses: codecov/codecov-action@v1
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets.CODECOV_TOKEN }}
|
token: ${{ secrets.CODECOV_TOKEN }}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue