6abf0434df
* baldm0mma/ add gha workflow * baldm0mma/ add codeowners * baldm0mma/ update health command * baldm0mma/ update aliases for services * baldm0mma/ rewrite migration attempt * baldm0mma/ fix package names for ubuntu * baldm0mma/ add authentication * baldm0mma/ update auth * baldm0mma/ add debugs * baldm0mma/ add continue on error * baldm0mma/ simplyfy ent fork logic * baldm0mma/ debug fork status * baldm0mma/ add debug workflow for enterprise access * chore: add workflow_dispatch trigger to backend test workflow * baldm0mma/ debug ent run * baldm0mma/ add more robust debugging info * baldm0mma/ use old drone ci app for testing * baldm0mma/ update app name * baldm0mma/ update workflow creds * baldm0mma/ rename * baldm0mma/ update codeownders * baldm0mma/ update paths to ignore paths for docs and markdown files * baldm0mma/ create 'Setup Grafana Enterprise' action and remove from current workflow * baldm0mma/ fail at git clone * baldm0mma/ absract away "Run backend tests" and "Run backend integration tests" into their own actions * baldm0mma/ update directory strcuture to adhere to GHAs best practices * baldm0mma/ remove optional configs * baldm0mma/ update codeowners * baldm0mma/ update gh app name * baldm0mma/ remove circ dep * baldm0mma/ uncomment out enterprise setup for test * baldm0mma/ update valut url * baldm0mma/ use vault instance rather than url * baldm0mma/ debug * baldm0mma/ Removed the multiline string format * baldm0mma/ add installation key * baldm0mma/ update path * baldm0mma/ debug vault access * baldm0mma/ add ent * baldm0mma/ remove debugging * baldm0mma/ update paths * baldm0mma/ update codeowners * baldm0mma/ update paths and codeowners * baldm0mma/ add continue-on-error to assure the workflow isn't blocking * baldm0mma/ simplify test action execution * baldm0mma/ remove wire install step * baldm0mma/ add conditions for coverage output * baldm0mma/ add conditions for coverage output for integration test action * baldm0mma/ add report converage file * baldm0mma/ remove uneeded action * baldm0mma/ update codeowners * baldm0mma/ push small change to go file and add log * baldm0mma/ update trigger conditions * baldm0mma/ update converage conditions * baldm0mma/ update Run backend integration tests with correct action * baldm0mma/ test 2 * baldm0mma/ update with -coverpkg flag * baldm0mma/ remove backend-coverage as it is now redundant * baldm0mma/ update codeowners * baldm0mma/ update test file * baldm0mma/ update coverage logic
47 lines
1.3 KiB
YAML
47 lines
1.3 KiB
YAML
name: 'Report Coverage'
|
|
description: 'Processes and uploads coverage reports from Go tests'
|
|
|
|
inputs:
|
|
unit-cov-path:
|
|
description: 'Path to unit test coverage file'
|
|
required: true
|
|
integration-cov-path:
|
|
description: 'Path to integration test coverage file'
|
|
required: true
|
|
|
|
runs:
|
|
using: "composite"
|
|
steps:
|
|
- name: Join coverage outputs
|
|
shell: bash
|
|
run: |
|
|
cp ${{ inputs.unit-cov-path }} backend.cov
|
|
tail -n+2 ${{ inputs.integration-cov-path }} >> backend.cov
|
|
|
|
- name: Convert coverage info to per-func stats
|
|
shell: bash
|
|
run: go tool cover -func backend.cov > backend-funcs.log
|
|
|
|
- name: Convert coverage info to HTML
|
|
shell: bash
|
|
run: go tool cover -html backend.cov -o backend.html
|
|
|
|
- name: Upload coverage file
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: backend-cov
|
|
path: |
|
|
backend.cov
|
|
backend-funcs.log
|
|
backend.html
|
|
retention-days: 30
|
|
compression-level: 9
|
|
|
|
- name: Set summary to total coverage
|
|
shell: bash
|
|
run: |
|
|
echo '# Coverage' >> $GITHUB_STEP_SUMMARY
|
|
echo '```' >> $GITHUB_STEP_SUMMARY
|
|
grep 'total:' backend-funcs.log | tr '\t' ' ' >> $GITHUB_STEP_SUMMARY
|
|
echo '```' >> $GITHUB_STEP_SUMMARY
|