Skip to content

Commit

Permalink
Update main.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
jnovack authored Nov 23, 2020
1 parent c920035 commit 3792fe4
Showing 1 changed file with 24 additions and 20 deletions.
44 changes: 24 additions & 20 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,31 +1,35 @@
name: main
name: Tests and Coverage
on:
- push
- pull_request
jobs:
build:
name: Build
runs-on: ubuntu-latest
test:
name: Test and Build
strategy:
matrix:
go-version: [1.14.x, 1.15.x]
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Setup Go
uses: actions/setup-go@v1
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: 1.13
id: go
- name: Code checkout
uses: actions/checkout@v1
go-version: ${{ matrix.go-version }}
- name: Checkout code
uses: actions/checkout@v2
- name: Test
run: |
go test -v ./... -coverprofile=coverage.txt -covermode=atomic
go test -v ./... -race
run: go test -v ./... -race
- name: Build
run: |
GOOS=linux go build
GOOS=darwin go build
GOOS=freebsd go build
GOOS=windows go build
GOARCH=386 go build
run: go build
coverage:
name: Code Coverage
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Generage coverage
run: go test -v ./... -coverprofile=coverage.txt -covermode=atomic
- name: Publish coverage
uses: codecov/codecov-action@v1.0.6
uses: codecov/codecov-action@v1
with:
file: ./coverage.txt

0 comments on commit 3792fe4

Please sign in to comment.