2021-07-21 09:34:52 +00:00
|
|
|
name: unit test
|
2021-06-22 09:43:46 +00:00
|
|
|
on:
|
|
|
|
# Trigger the workflow on push or pull request,
|
|
|
|
# but only for the master branch
|
|
|
|
push:
|
|
|
|
paths-ignore:
|
|
|
|
- '**.md'
|
|
|
|
- '**.png'
|
|
|
|
pull_request:
|
|
|
|
paths-ignore:
|
|
|
|
- '**.md'
|
|
|
|
- '**.png'
|
|
|
|
jobs:
|
|
|
|
run:
|
2021-07-21 09:34:52 +00:00
|
|
|
name: go test on linux
|
2021-06-22 09:43:46 +00:00
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
go-version: [1.16.x]
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Install Go
|
|
|
|
uses: actions/setup-go@v2
|
|
|
|
with:
|
|
|
|
go-version: ${{ matrix.go-version }}
|
|
|
|
# This step checks out a copy of your repository.
|
|
|
|
- name: Checkout code
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Go test
|
|
|
|
env:
|
|
|
|
GOVERSION: ${{ matrix.go-version }}
|
|
|
|
run: |
|
2021-07-21 09:34:52 +00:00
|
|
|
make test
|
2021-06-22 09:43:46 +00:00
|
|
|
bash <(curl -s https://codecov.io/bash) -F unittest-$GOVERSION
|