Bump golang.org/x/net from 0.22.0 to 0.23.0 #155
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Unit test | |
# Runs during pull request | |
# Always needs to pass in order for PR to be accepted | |
on: | |
pull_request: | |
branches: | |
- master | |
jobs: | |
unit-test: | |
name: unit-test | |
runs-on: ubuntu-latest | |
steps: | |
- name: Install Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: 1.21 | |
- name: Check out code into the Go module directory | |
uses: actions/checkout@v4 | |
- name: Test and compute coverage | |
run: make coverage # includes vet and lint | |
- name: Enforce coverage | |
run: | | |
export COVERAGE=$(go tool cover -func coverage.out | grep total | awk '{print substr($3, 1, length($3)-1)}') | |
echo "code coverage is at ${COVERAGE}" | |
if [ 1 -eq "$(echo "${COVERAGE} > 76.0" | bc)" ]; then \ | |
echo "all good... coverage is above 76.0%"; | |
else \ | |
echo "not good... coverage is not above 76.0%"; | |
exit 1 | |
fi |