feat: Update Go test workflow to use coverage script and include additional package in coverage exclusion
This commit is contained in:
8
.github/workflows/codecov-upload.yml
vendored
8
.github/workflows/codecov-upload.yml
vendored
@@ -26,19 +26,19 @@ jobs:
|
||||
go-version: '1.25.5'
|
||||
cache-dependency-path: backend/go.sum
|
||||
|
||||
- name: Run Go tests
|
||||
working-directory: backend
|
||||
- name: Run Go tests with coverage
|
||||
working-directory: ${{ github.workspace }}
|
||||
env:
|
||||
CGO_ENABLED: 1
|
||||
run: |
|
||||
go test -race -v -coverprofile=coverage.out ./... 2>&1 | tee test-output.txt
|
||||
bash scripts/go-test-coverage.sh 2>&1 | tee backend/test-output.txt
|
||||
exit ${PIPESTATUS[0]}
|
||||
|
||||
- name: Upload backend coverage to Codecov
|
||||
uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # v5
|
||||
with:
|
||||
token: ${{ secrets.CODECOV_TOKEN }}
|
||||
files: ./backend/coverage.out
|
||||
files: ./backend/coverage.txt
|
||||
flags: backend
|
||||
fail_ci_if_error: true
|
||||
|
||||
|
||||
Reference in New Issue
Block a user