ci: simplifying jobs

This commit is contained in:
Reinaldy Rafli 2021-12-10 16:50:35 +07:00
parent 19b92b7f3f
commit 29f429eda3
No known key found for this signature in database
GPG Key ID: CFDB9400255D8CB6
2 changed files with 7 additions and 30 deletions

View File

@ -1,26 +0,0 @@
name: Build test
on: [pull_request, push]
jobs:
build-test:
name: Build test
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
go-version: [1.15.x, 1.16.x, 1.17.x]
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go-version }}
- name: Run go vet
run: go vet
- name: Test
run: go test -v -race -covermode=atomic -failfast

View File

@ -3,19 +3,22 @@ name: Test and coverage
on: [push, pull_request]
jobs:
build:
check:
name: Check
runs-on: ubuntu-latest
needs: build
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
fetch-depth: 2
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: 1.17.x
- name: Vet check
run: go vet -v
- name: Run coverage
run: go test -v -race -coverprofile=coverage.out -covermode=atomic -failfast