Github Actions Changeover (#679)
parent
456221b630
commit
3bb4866602
@ -1,13 +1,7 @@ |
|||||||
Fixes Or Enhances # . |
## Fixes Or Enhances |
||||||
|
|
||||||
|
|
||||||
**Make sure that you've checked the boxes below before you submit PR:** |
**Make sure that you've checked the boxes below before you submit PR:** |
||||||
- [ ] Tests exist or have been written that cover this particular change. |
- [ ] Tests exist or have been written that cover this particular change. |
||||||
|
|
||||||
Change Details: |
|
||||||
|
|
||||||
- |
|
||||||
- |
|
||||||
- |
|
||||||
|
|
||||||
|
|
||||||
@go-playground/admins |
@go-playground/admins |
@ -0,0 +1,45 @@ |
|||||||
|
on: |
||||||
|
push: |
||||||
|
branches: |
||||||
|
- master |
||||||
|
pull_request: |
||||||
|
name: Test |
||||||
|
jobs: |
||||||
|
test: |
||||||
|
strategy: |
||||||
|
matrix: |
||||||
|
go-version: [1.14.x, 1.15.x] |
||||||
|
os: [ubuntu-latest, macos-latest, windows-latest] |
||||||
|
runs-on: ${{ matrix.os }} |
||||||
|
steps: |
||||||
|
- name: Install Go |
||||||
|
uses: actions/setup-go@v2 |
||||||
|
with: |
||||||
|
go-version: ${{ matrix.go-version }} |
||||||
|
|
||||||
|
- name: Restore Cache |
||||||
|
if: matrix.os != 'ubuntu-latest' && matrix.go-version != '1.15.x' |
||||||
|
uses: actions/cache@v2 |
||||||
|
with: |
||||||
|
path: ~/go/pkg/mod |
||||||
|
key: ${{ runner.os }}-v1-go-${{ hashFiles('**/go.sum') }} |
||||||
|
restore-keys: | |
||||||
|
${{ runner.os }}-v1-go- |
||||||
|
|
||||||
|
- name: Checkout code |
||||||
|
uses: actions/checkout@v2 |
||||||
|
|
||||||
|
- name: lint |
||||||
|
if: matrix.os == 'ubuntu-latest' && matrix.go-version == '1.15.x' |
||||||
|
uses: golangci/golangci-lint-action@v2 |
||||||
|
with: |
||||||
|
version: v1.31 |
||||||
|
|
||||||
|
- name: Test |
||||||
|
run: go test -race -covermode=atomic -coverprofile="profile.cov" ./... |
||||||
|
|
||||||
|
- name: Send Coverage |
||||||
|
if: matrix.os == 'ubuntu-latest' && matrix.go-version == '1.15.x' |
||||||
|
uses: shogo82148/actions-goveralls@v1 |
||||||
|
with: |
||||||
|
path-to-profile: profile.cov |
@ -1,29 +0,0 @@ |
|||||||
language: go |
|
||||||
go: |
|
||||||
- 1.15.2 |
|
||||||
- tip |
|
||||||
matrix: |
|
||||||
allow_failures: |
|
||||||
- go: tip |
|
||||||
|
|
||||||
notifications: |
|
||||||
email: |
|
||||||
recipients: dean.karn@gmail.com |
|
||||||
on_success: change |
|
||||||
on_failure: always |
|
||||||
|
|
||||||
before_install: |
|
||||||
- go install github.com/mattn/goveralls |
|
||||||
- mkdir -p $GOPATH/src/gopkg.in |
|
||||||
- ln -s $GOPATH/src/github.com/$TRAVIS_REPO_SLUG $GOPATH/src/gopkg.in/validator.v9 |
|
||||||
|
|
||||||
# Only clone the most recent commit. |
|
||||||
git: |
|
||||||
depth: 1 |
|
||||||
|
|
||||||
script: |
|
||||||
- go test -v -race -covermode=atomic -coverprofile=coverage.coverprofile ./... |
|
||||||
|
|
||||||
after_success: | |
|
||||||
[ $TRAVIS_GO_VERSION = 1.15.2 ] && |
|
||||||
goveralls -coverprofile=coverage.coverprofile -service travis-ci -repotoken $COVERALLS_TOKEN |
|
Loading…
Reference in new issue