-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
33 additions
and
1 deletion.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,8 @@ name: CI Build and Test | |
|
||
on: | ||
workflow_call: | ||
push: | ||
branches: ['main'] | ||
pull_request: | ||
branches: ['main'] | ||
|
||
|
@@ -27,3 +29,28 @@ jobs: | |
run: go build -tags release -v ./... | ||
- name: Test | ||
run: make test | ||
- name: Archive code coverage results | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: code-coverage | ||
path: coverage.out | ||
|
||
|
||
# XXX this will fail if main does not already have a coverage.out report uploaded by the previous job | ||
# TODO uncomment this after upload-artifact has run on main branch | ||
# code-coverage: | ||
# name: Code coverage report | ||
# runs-on: ubuntu-latest | ||
# needs: build-and-test | ||
# steps: | ||
# - name: coverage report | ||
# id: coverage-report | ||
# uses: fgrosse/[email protected] | ||
# with: | ||
# coverage-file-name: coverage.out | ||
# skip-comment: true # requires write permissin on pull requests | ||
# # below options help track coverage across forks | ||
# trim: github.com/project-kessel/inventory-api | ||
# root-package: "" | ||
# - name: coverage summary | ||
# run: echo "${{ steps.coverage-report.outputs.coverage_report }}" >> "$GITHUB_STEP_SUMMARY" |
This file contains 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
This file contains 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