Skip to content

fixed example

fixed example #11

Workflow file for this run

name: Run unit tests
on:
pull_request:
push:
branches:
- master
jobs:
test:
strategy:
matrix:
go_version: ['1.19','1.20','1.21']
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go_version }}
stable: true
check-latest: true
- uses: actions/checkout@v3
- name: Test gflag package
run: |
DEPS="$(go list -deps ./...|grep 'fredbi/gflag')"
go test \
-v \
-coverprofile=cover.out \
-covermode=atomic \
-coverpkg="$(echo ${DEPS}|sed -E '1,$s/\s/,/g')" \
./...
- name: Prepare coverage output
uses: shogo82148/actions-goveralls@v1
with:
path-to-profile: cover.out