Skip to content

Bump github.com/stretchr/testify from 1.9.0 to 1.10.0 #251

Bump github.com/stretchr/testify from 1.9.0 to 1.10.0

Bump github.com/stretchr/testify from 1.9.0 to 1.10.0 #251

Workflow file for this run

name: Test Incoming Changes
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:
jobs:
test:
name: Run Tests
runs-on: ubuntu-24.04
steps:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.23.2
- name: Check out code into the Go module directory
uses: actions/checkout@v4
- name: Run Tests
run: make generate-golang-schema build tests
- name: Quality Gate - Test coverage shall be above threshold
env:
TESTCOVERAGE_THRESHOLD: 40
run: |
echo "Quality Gate: checking test coverage is above threshold ..."
echo "Threshold : $TESTCOVERAGE_THRESHOLD %"
totalCoverage=`go tool cover -func=cover.out | grep total | grep -Eo '[0-9]+\.[0-9]+'`
echo "Current test coverage : $totalCoverage %"
if (( $(echo "$totalCoverage $TESTCOVERAGE_THRESHOLD" | awk '{print ($1 > $2)}') )); then
echo "OK"
else
echo "Current test coverage is below threshold. Please add more unit tests or adjust threshold to a lower value."
echo "Failed"
exit 1
fi