chore(deps): bump github.com/stretchr/testify from 1.11.1 to 1.12.1 #281
Workflow file for this run
This file contains hidden or 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: Testing | |
| on: | |
| push: | |
| branches: | |
| - master | |
| pull_request: | |
| jobs: | |
| test: | |
| name: Test and Sanity | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - uses: actions/setup-go@v7 | |
| with: | |
| go-version: 1.25 | |
| cache: false | |
| - name: Download Go Modules | |
| run: go mod download | |
| - uses: golangci/golangci-lint-action@v9 | |
| with: | |
| version: v2.8.0 | |
| - run: go test -v ./... | |
| - run: | | |
| coveredFiles=$(go list ./... | grep -v 'github.com/zostay/today/\(cmd\|tools/gen/verses\)') | |
| go test $coveredFiles -coverprofile=coverage.out | |
| - run: go tool cover -func=coverage.out | |
| - name: Coverage Quality Check | |
| env: | |
| REQUIRED_COVERAGE: 80 | |
| run: | | |
| totalCoverage=$(go tool cover -func=coverage.out | grep total | grep -Eo '[0-9]+\.[0-9]+') | |
| echo "Total Coverage: $totalCoverage %" | |
| if (( $(echo "$totalCoverage < $REQUIRED_COVERAGE" | bc -l) )); then | |
| echo "Coverage is less than $REQUIRED_COVERAGE %" | |
| exit 1 | |
| fi | |
| - name: Prepare/Release Workflows Check | |
| run: | | |
| go install github.com/mikefarah/yq/v4@latest | |
| yq '.jobs.release.steps.[0:10]' .github/workflows/release.yaml > release-steps.yaml | |
| yq '.jobs.prepare.steps' .github/workflows/prepare.yaml > prepare-steps.yaml | |
| if ! diff release-steps.yaml prepare-steps.yaml; then | |
| echo "Prepare and Release workflows are not in sync!" | |
| exit 1 | |
| fi | |
| if ! yq '.jobs.release.steps.[10]' .github/workflows/release.yaml | grep -q 'Create Release'; then | |
| echo 'Release has pre-build steps missing from Prepare workflow!' | |
| exit 1 | |
| fi |