goc/.github/workflows/ut_check.yml

35 lines
921 B
YAML
Raw Normal View History

name: ut-check
on:
# Trigger the workflow on push or pull request,
# but only for the master branch
push:
paths-ignore:
- '**.md'
2021-01-17 10:03:47 +00:00
- '**.png'
pull_request:
paths-ignore:
- '**.md'
2021-01-17 10:03:47 +00:00
- '**.png'
jobs:
run:
name: go test
strategy:
matrix:
2020-09-11 08:06:35 +00:00
go-version: [1.13.x, 1.14.x, 1.15.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
2020-07-21 03:49:57 +00:00
env:
GOVERSION: ${{ matrix.go-version }}
run: |
export DEFAULT_EXCEPT_PKGS=e2e
go test -p 1 -coverprofile=coverage.txt $(go list ./... | grep -v -E $DEFAULT_EXCEPT_PKGS)
2020-07-21 03:49:57 +00:00
bash <(curl -s https://codecov.io/bash) -F unittest-$GOVERSION