fix: correct CHANGELOG link reference from v0.1.2 to v0.1.1 #5
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: Tests | |
| on: | |
| push: | |
| branches: [ main, master ] | |
| pull_request: | |
| branches: [ main, master ] | |
| jobs: | |
| test: | |
| name: Run Tests | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: '1.23' | |
| - name: Cache Go modules | |
| uses: actions/cache@v3 | |
| with: | |
| path: ~/go/pkg/mod | |
| key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | |
| restore-keys: | | |
| ${{ runner.os }}-go- | |
| - name: Download dependencies | |
| run: go mod download | |
| - name: Run unit tests | |
| run: make test-unit | |
| - name: Run integration tests | |
| run: make test-integration | |
| - name: Generate coverage report | |
| run: | | |
| cd tests/unit | |
| go test -coverprofile=coverage.out -coverpkg=github.com/bolanosdev/query-builder . | |
| go tool cover -func=coverage.out | |
| - name: Check coverage threshold | |
| run: | | |
| cd tests/unit | |
| COVERAGE=$(go tool cover -func=coverage.out | grep total | awk '{print $3}' | sed 's/%//') | |
| echo "Coverage: ${COVERAGE}%" | |
| if (( $(echo "$COVERAGE < 85.0" | bc -l) )); then | |
| echo "Coverage is below 85%" | |
| exit 1 | |
| fi |