You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
majority-judgment-library-go/.github/workflows/go.yml

66 lines
1.2 KiB

name: Go
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.16
- name: Build
run: go build -v ./...
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.16
- name: Build
run: go build -v ./...
- name: Test
run: go test -v ./...
coverage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.16
- name: Build
run: go build -v ./...
- name: Test
run: go test -v ./...
- name: Generate coverage report
run: |
go test `go list ./... | grep -v examples` -coverprofile=coverage.txt -covermode=atomic
- name: Upload coverage report
uses: codecov/codecov-action@v1.0.2
with:
token: 50ed170f-08b5-4484-97d8-37771615ae42
file: ./coverage.txt
flags: unittests
name: codecov-umbrella