mirror of https://github.com/aldy505/bob.git
ci: simplifying jobs
This commit is contained in:
parent
19b92b7f3f
commit
29f429eda3
|
@ -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
|
|
|
@ -3,21 +3,24 @@ name: Test and coverage
|
||||||
on: [push, pull_request]
|
on: [push, pull_request]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
check:
|
||||||
|
name: Check
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
needs: build
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
with:
|
|
||||||
fetch-depth: 2
|
|
||||||
|
|
||||||
- name: Install Go
|
- name: Install Go
|
||||||
uses: actions/setup-go@v2
|
uses: actions/setup-go@v2
|
||||||
with:
|
with:
|
||||||
go-version: 1.17.x
|
go-version: 1.17.x
|
||||||
|
|
||||||
|
- name: Vet check
|
||||||
|
run: go vet -v
|
||||||
|
|
||||||
- name: Run coverage
|
- name: Run coverage
|
||||||
run: go test -v -race -coverprofile=coverage.out -covermode=atomic -failfast
|
run: go test -v -race -coverprofile=coverage.out -covermode=atomic -failfast
|
||||||
|
|
||||||
- name: Upload coverage to Codecov
|
- name: Upload coverage to Codecov
|
||||||
uses: codecov/codecov-action@v1
|
uses: codecov/codecov-action@v1
|
||||||
|
|
Loading…
Reference in New Issue