From 664a11ad4a7e0a41f326003f0be9991aab78b24d Mon Sep 17 00:00:00 2001 From: Sterling Hanenkamp Date: Thu, 13 Jun 2024 22:54:29 -0500 Subject: [PATCH] fix: cicd --- .github/workflows/test.yaml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 99a843c..8f75621 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -10,19 +10,19 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-go@v5 with: - go-version: 1.19 + go-version: 1.20 + cache: false - uses: golangci/golangci-lint-action@v6 with: - version: v1.59.0 - - run: go test ./... - name: Run All Tests - - run: go test ./... -coverprofile=coverage.out - name: Run Tests with Coverage + version: v1.59 + - 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: Display Coverage - name: Coverage Quality Check env: - REQUIRED_COVERAGE: 90 + REQUIRED_COVERAGE: 95 run: | totalCoverage=$(go tool cover -func=coverage.out | grep total | grep -Eo '[0-9]+\.[0-9]+') echo "Total Coverage: $totalCoverage %"