Merge pull request #3 from Snider/feat-ci-improvements
Feat ci improvements
This commit is contained in:
commit
ab91100e38
3 changed files with 41 additions and 8 deletions
41
.github/workflows/release.yml
vendored
41
.github/workflows/release.yml
vendored
|
|
@ -2,6 +2,8 @@ name: Release
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
|
branches:
|
||||||
|
- '**'
|
||||||
tags:
|
tags:
|
||||||
- 'v*.*.*'
|
- 'v*.*.*'
|
||||||
|
|
||||||
|
|
@ -11,11 +13,38 @@ permissions:
|
||||||
issues: write
|
issues: write
|
||||||
id-token: write
|
id-token: write
|
||||||
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
test:
|
||||||
|
name: Test
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
os: [ubuntu-latest, macos-latest, windows-latest]
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: Set up Go
|
||||||
|
uses: actions/setup-go@v5
|
||||||
|
with:
|
||||||
|
go-version: stable
|
||||||
|
|
||||||
|
- name: Run pre-release tests
|
||||||
|
run: make test-release
|
||||||
|
|
||||||
|
- name: Upload coverage to Codecov
|
||||||
|
if: matrix.os == 'ubuntu-latest'
|
||||||
|
uses: codecov/codecov-action@v4
|
||||||
|
with:
|
||||||
|
token: ${{ secrets.CODECOV_TOKEN }}
|
||||||
|
|
||||||
release:
|
release:
|
||||||
name: Release
|
name: Release
|
||||||
|
needs: test
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
if: github.ref_type == 'tag'
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
@ -32,11 +61,11 @@ jobs:
|
||||||
with:
|
with:
|
||||||
node-version: '20'
|
node-version: '20'
|
||||||
|
|
||||||
# - name: Build UI
|
# - name: Build UI
|
||||||
# run: |
|
# run: |
|
||||||
# cd ui
|
# cd ui
|
||||||
# npm install
|
# npm install
|
||||||
# npm run build
|
# npm run build
|
||||||
|
|
||||||
- name: Run GoReleaser
|
- name: Run GoReleaser
|
||||||
uses: goreleaser/goreleaser-action@v6
|
uses: goreleaser/goreleaser-action@v6
|
||||||
|
|
|
||||||
4
Makefile
4
Makefile
|
|
@ -32,6 +32,10 @@ test:
|
||||||
@echo "Running tests..."
|
@echo "Running tests..."
|
||||||
$(GO) test -v -race -coverprofile=coverage.out ./...
|
$(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
|
# Run tests with coverage report
|
||||||
coverage: test
|
coverage: test
|
||||||
@echo "Generating coverage report..."
|
@echo "Generating coverage report..."
|
||||||
|
|
|
||||||
|
|
@ -3,9 +3,9 @@
|
||||||
[](https://golang.org)
|
[](https://golang.org)
|
||||||
[](https://pkg.go.dev/github.com/Snider/Mining)
|
[](https://pkg.go.dev/github.com/Snider/Mining)
|
||||||
[](https://goreportcard.com/report/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://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.
|
GoLang Miner management with RESTful control - A modern, modular package for managing cryptocurrency miners.
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue