Skip to content

Commit

Permalink
Merge pull request #16 from robgonnella/update-test-coverage-job
Browse files Browse the repository at this point in the history
Amend existing commit when updating coverage badge
  • Loading branch information
robgonnella authored Dec 13, 2023
2 parents d6fa471 + e19f75c commit f8fd2f0
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .github/workflows/test-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ jobs:
with:
persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal access token.
fetch-depth: 0 # otherwise, there would be errors pushing refs to the destination repository.
ref: ${{ github.head_ref }}

- name: Setup go
uses: actions/setup-go@v4
Expand Down Expand Up @@ -46,11 +47,12 @@ jobs:
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git add README.md
git commit -m "chore: Updated coverage badge."
git commit --amend --no-edit
- name: Push changes
if: steps.verify-changed-files.outputs.files_changed == 'true'
uses: ad-m/github-push-action@master
with:
github_token: ${{ github.token }}
branch: ${{ github.head_ref }}
force: true
8 changes: 8 additions & 0 deletions internal/logger/logger_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,4 +128,12 @@ func TestLogger(t *testing.T) {
assert.NoError(st, err)
assert.Contains(st, string(output), testString)
})

t.Run("logs", func(st *testing.T) {
log := logger.New()
log.Debug().Msg("debug message")
log.Info().Msg("info message")
log.Error().Msg("error message")
log.Warn().Msg("warning message")
})
}

0 comments on commit f8fd2f0

Please sign in to comment.