https://github.com/gotesttools/limgo-action
GitHub Action for limgo
https://github.com/gotesttools/limgo-action
github-actions go golang test-coverage testing
Last synced: 27 days ago
JSON representation
GitHub Action for limgo
- Host: GitHub
- URL: https://github.com/gotesttools/limgo-action
- Owner: GoTestTools
- Created: 2022-10-07T10:00:14.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-06-26T13:04:58.000Z (over 1 year ago)
- Last Synced: 2024-10-14T09:43:46.229Z (over 1 year ago)
- Topics: github-actions, go, golang, test-coverage, testing
- Language: TypeScript
- Homepage:
- Size: 57.6 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
limgo-action
Don't let your test coverage drop
---
This action uses [limgo](https://github.com/GoTestTools/limgo) to enforce test coverage thresholds.
## Usage
You can use `limgo-action` with the following configuration:
```yaml
jobs:
build:
name: Test
runs-on: ubuntu-latest
steps:
# Checkout your project with git
- name: Checkout
uses: actions/checkout@v2
# Install Go on the VM running the action.
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.19
# Run your tests with -coverprofile
- name: Run tests
run: |
go test ./... -coverprofile=test.cov
# Option 1:
# Run the test coverage check using the limgo-action
- name: Run test coverage check
uses: GoTestTools/limgo-action@v1.0.0
with:
version: "v0.0.0-beta"
args: "-coverfile=test.cov -outfile=covcheck.tmp -config=.limgo.json -v=3"
# Option 2:
# Only install limgo and use it later
- name: Run test coverage check
uses: GoTestTools/limgo-action@v1.0.0
with:
version: "v0.0.0-beta"
install-only: true
# Optional:
# Upload the coverage check results as artifact
- name: Upload test coverage results
uses: actions/upload-artifact@v3
if: success() || failure()
with:
name: test-coverage-results
path: covcheck.tmp
if-no-files-found: error
```
For more information about `limgo` please see the [limgo](https://github.com/GoTestTools/limgo) repository.