Skip to content

chore(deps): bump the dependencies group with 2 updates #542

chore(deps): bump the dependencies group with 2 updates

chore(deps): bump the dependencies group with 2 updates #542

Workflow file for this run

name: build
on:
push:
branches:
- main
pull_request:
workflow_dispatch:
permissions:
contents: read
pull-requests: read
jobs:
build:
name: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
persist-credentials: false
- uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0
with:
go-version: stable # see https://github.com/actions/setup-go/?tab=readme-ov-file#using-stableoldstable-aliases
- name: build
run: make build
- name: test
run: make test-cov
- name: test coverage check
env:
TESTCOVERAGE_THRESHOLD: 26
run: |
echo "Quality Gate: checking test coverage is above threshold ..."
echo "Threshold : $TESTCOVERAGE_THRESHOLD %"
totalCoverage=`go tool cover -func=coverage.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