2020-05-13 03:39:17 +00:00
|
|
|
name: ut-check
|
|
|
|
on:
|
|
|
|
# Trigger the workflow on push or pull request,
|
|
|
|
# but only for the master branch
|
|
|
|
push:
|
|
|
|
paths-ignore:
|
|
|
|
- '**.md'
|
|
|
|
pull_request:
|
|
|
|
paths-ignore:
|
|
|
|
- '**.md'
|
|
|
|
jobs:
|
|
|
|
run:
|
|
|
|
name: go test
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
go-version: [1.13.x, 1.14.x]
|
2020-05-14 07:29:31 +00:00
|
|
|
runs-on: ubuntu-latest
|
2020-05-13 03:39:17 +00:00
|
|
|
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
|
|
|
|
run: |
|
2020-05-21 06:30:41 +00:00
|
|
|
export DEFAULT_EXCEPT_PKGS=e2e
|
2020-05-31 13:14:12 +00:00
|
|
|
go test -p 1 -coverprofile=coverage.txt $(go list ./... | grep -v -E $DEFAULT_EXCEPT_PKGS)
|
2020-07-11 00:43:27 +00:00
|
|
|
bash <(curl -s https://codecov.io/bash) -F unittest
|