Skip to content

Commit

Permalink
Tweak Workflows to trigger coverage creation and ensure permissions a…
Browse files Browse the repository at this point in the history
…re set
  • Loading branch information
davidcollom committed Aug 27, 2024
1 parent 45fd679 commit 81c83ba
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
13 changes: 9 additions & 4 deletions .github/workflows/build-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ on:
pull_request:
branches:
- 'main'
paths:
- "!README.md"

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand Down Expand Up @@ -58,10 +60,13 @@ jobs:
- name: Run all unit tests
run: make test

- name: Check test coverage
run: |
go install github.com/vladopajic/go-test-coverage/v2@latest
go-test-coverage --config=./.testcoverage.yml
- name: check test coverage
uses: vladopajic/go-test-coverage@v2
with:
config: ./.testcoverage.yml

- name: Trigger Coverage update
uses: ./coverage-badge.yaml

- name: Generate code coverage artifacts
uses: actions/upload-artifact@v4
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/coverage-badge.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@ name: Generate code coverage badge

on:
workflow_dispatch: # Here for Testing
push:
branches:
- main
workflow_call:

permissions:
contents: write

jobs:
test:
Expand Down

0 comments on commit 81c83ba

Please sign in to comment.