add coverage report for actions tests

This commit is contained in:
Ben McClelland
2023-06-25 10:54:24 -07:00
parent 1d476c6d4d
commit 1da0c1ceba
4 changed files with 49 additions and 12 deletions
+9 -10
View File
@@ -3,7 +3,7 @@ on: pull_request
jobs:
build:
name: Build
name: RunTests
runs-on: ubuntu-latest
steps:
@@ -16,16 +16,15 @@ jobs:
- name: Check out code into the Go module directory
uses: actions/checkout@v3
- name: Get dependencies
- name: Get Dependencies
run: |
go get -v -t -d ./...
- name: Build
run: make
- name: Test
- name: Build and Run
run: |
mkdir /tmp/gw
./versitygw -a user -s pass posix /tmp/gw &
sleep 1
./versitygw test -a user -s pass -e http://127.0.0.1:7070 full-flow
make testbin
./runtests.sh
- name: Coverage Report
run: |
go tool covdata percent -i=/tmp/covdata
+2 -2
View File
@@ -24,10 +24,10 @@ jobs:
go get -v -t -d ./...
- name: Build
run: go build -o versitygw cmd/versitygw/*.go
run: make
- name: Test
run: go test -v -timeout 30s -tags=github ./...
run: go test -coverprofile profile.txt -race -v -timeout 30s -tags=github ./...
- name: Install govulncheck
run: go install golang.org/x/vuln/cmd/govulncheck@latest