feat(ci): add pre-release testing and codecov
- Adds a `test-release` target to the `Makefile` to run tests and cross-compile the binaries for all platforms. - Updates the `release.yml` workflow to use the new `test-release` target before the `GoReleaser` action. - Adds a step to the `release.yml` workflow to upload the coverage report to Codecov. - Reorganizes the badges in the `README.md` file.
This commit is contained in:
parent
e36ce20d96
commit
0fb239a239
3 changed files with 14 additions and 2 deletions
8
.github/workflows/release.yml
vendored
8
.github/workflows/release.yml
vendored
|
|
@ -38,6 +38,14 @@ jobs:
|
|||
# npm install
|
||||
# npm run build
|
||||
|
||||
- name: Run pre-release tests
|
||||
run: make test-release
|
||||
|
||||
- name: Upload coverage to Codecov
|
||||
uses: codecov/codecov-action@v4
|
||||
with:
|
||||
token: ${{ secrets.CODECOV_TOKEN }}
|
||||
|
||||
- name: Run GoReleaser
|
||||
uses: goreleaser/goreleaser-action@v6
|
||||
with:
|
||||
|
|
|
|||
4
Makefile
4
Makefile
|
|
@ -32,6 +32,10 @@ test:
|
|||
@echo "Running tests..."
|
||||
$(GO) test -v -race -coverprofile=coverage.out ./...
|
||||
|
||||
# Run tests and build for all platforms
|
||||
test-release: test build-all
|
||||
@echo "Test release successful"
|
||||
|
||||
# Run tests with coverage report
|
||||
coverage: test
|
||||
@echo "Generating coverage report..."
|
||||
|
|
|
|||
|
|
@ -3,9 +3,9 @@
|
|||
[](https://golang.org)
|
||||
[](https://pkg.go.dev/github.com/Snider/Mining)
|
||||
[](https://goreportcard.com/report/github.com/Snider/Mining)
|
||||
[](https://opensource.org/license/eupl-1-2)
|
||||
[](https://github.com/Snider/Mining/releases)
|
||||
[](https://codecov.io/gh/Snider/Mining)
|
||||
[](https://github.com/Snider/Mining/releases)
|
||||
[](https://opensource.org/license/eupl-1-2)
|
||||
|
||||
GoLang Miner management with RESTful control - A modern, modular package for managing cryptocurrency miners.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue