Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/k1low/octocov-action
:octocat: GitHub Action for octocov
https://github.com/k1low/octocov-action
badge code-coverage code-metrics code-to-test-ratio coverage-report github-actions test-execution-time testing
Last synced: 8 days ago
JSON representation
:octocat: GitHub Action for octocov
- Host: GitHub
- URL: https://github.com/k1low/octocov-action
- Owner: k1LoW
- License: mit
- Created: 2021-05-04T21:12:08.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-09-08T22:08:55.000Z (5 months ago)
- Last Synced: 2025-01-15T20:17:28.734Z (15 days ago)
- Topics: badge, code-coverage, code-metrics, code-to-test-ratio, coverage-report, github-actions, test-execution-time, testing
- Homepage: https://github.com/marketplace/actions/run-octocov
- Size: 352 KB
- Stars: 41
- Watchers: 2
- Forks: 6
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# octocov-action
:octocat: GitHub Action for [octocov](https://github.com/k1LoW/octocov)
![comment](docs/comment_with_diff.png)
## Usage
Add `.octocov.yml` ( or `octocov.yml` ) file to your repository.
( `octocov init` is useful for easy generation. )
``` yaml
# .octocov.yml Go example
coverage:
paths:
- path/to/coverage.out
codeToTestRatio:
code:
- '**/*.go'
- '!**/*_test.go'
test:
- '**/*_test.go'
testExecutionTime:
if: true
diff:
datastores:
- artifact://${GITHUB_REPOSITORY}
comment:
if: is_pull_request
report:
if: is_default_branch
datastores:
- artifact://${GITHUB_REPOSITORY}
```And set up a workflow file as follows and run octocov on GitHub Actions.
``` yaml
# .github/workflows/ci.yml
name: Teston:
push:
branches:
- main
pull_request:jobs:
test:
runs-on: ubuntu-latest
steps:
-
uses: actions/checkout@v4
-
uses: actions/setup-go@v4
with:
go-version-file: go.mod
-
name: Run tests with coverage report output
run: go test ./... -coverprofile=coverage.out
-
uses: k1LoW/octocov-action@v1
```See [action.yml](action.yml) and [octocov README](https://github.com/k1LoW/octocov) for more details on how to configure it.
## [Docker container action](https://docs.github.com/en/actions/creating-actions/creating-a-docker-container-action) version
Use `v0`.