Skip to content

Commit

Permalink
Change name of output to avoid conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
carlpartridge committed Feb 11, 2025
1 parent bf4ec30 commit a15cd11
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/ci-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ jobs:
- name: Archive code coverage results
uses: actions/upload-artifact@v4
with:
name: code-coverage-report
path: ./test_results/latest/testcoverage.out
name: code-coverage-report-ssas
path: ./test_results/latest/testcoverage-ssas.out

sonar-quality-gate:
name: Sonarqube Quality Gate
Expand All @@ -83,7 +83,7 @@ jobs:
- name: Download code coverage
uses: actions/download-artifact@v4
with:
name: code-coverage-report
name: code-coverage-report-ssas
- name: Set env vars from AWS params
uses: cmsgov/ab2d-bcda-dpc-platform/actions/aws-params-env-action@main
env:
Expand All @@ -99,7 +99,7 @@ jobs:
-Dsonar.projectKey=bcda-ssas-api
-Dsonar.sources=.
-Dsonar.working.directory=./sonar_workspace
-Dsonar.go.coverage.reportPaths=./test_results/latest/testcoverage.out
-Dsonar.go.coverage.reportPaths=./test_results/latest/testcoverage-ssas.out
-Dsonar.coverage.exclusions=**/*test.go,**/test/**/*,**/testUtils/*,**/scripts/*,**/ops/*,**/mock*.go,**/mock/**/*
-Dsonar.branch.name=${{ github.event.pull_request.head.ref }}
-Dsonar.projectVersion=${{ github.event.pull_request.head.sha }}
Expand Down
6 changes: 3 additions & 3 deletions unit_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ DATABASE_URL=$TEST_DB_URL DEBUG=true go run github.com/CMSgov/bcda-ssas-app/ssas
echo "Successfully loaded SSAS fixture data"

echo "Running SSAS unit tests and placing results/coverage in test_results/${timestamp} on host..."
DATABASE_URL=$TEST_DB_URL QUEUE_DATABASE_URL=$TEST_DB_URL gotestsum --debug --junitfile test_results/${timestamp}/junit.xml -- -cover -coverpkg ./... -p 1 -race ./ssas/... -coverprofile test_results/${timestamp}/testcoverage.out 2>&1 | tee test_results/${timestamp}/testresults.out
go tool cover -func test_results/${timestamp}/testcoverage.out > test_results/${timestamp}/testcov_byfunc.out
DATABASE_URL=$TEST_DB_URL QUEUE_DATABASE_URL=$TEST_DB_URL gotestsum --debug --junitfile test_results/${timestamp}/junit.xml -- -cover -coverpkg ./... -p 1 -race ./ssas/... -coverprofile test_results/${timestamp}/testcoverage-ssas.out 2>&1 | tee test_results/${timestamp}/testresults.out
go tool cover -func test_results/${timestamp}/testcoverage-ssas.out > test_results/${timestamp}/testcov_byfunc.out
echo TOTAL COVERAGE: $(tail -1 test_results/${timestamp}/testcov_byfunc.out | head -1)
go tool cover -html=test_results/${timestamp}/testcoverage.out -o test_results/${timestamp}/testcoverage.html
go tool cover -html=test_results/${timestamp}/testcoverage-ssas.out -o test_results/${timestamp}/testcoverage.html
cp test_results/${timestamp}/* test_results/latest
echo "Cleaning up test DB (ssas_test)..."
usql $DB_HOST_URL -c 'drop database ssas_test;'

0 comments on commit a15cd11

Please # to comment.