Merge pull request #3 from Snider/feat-ci-improvements

Feat ci improvements
This commit is contained in:
Snider 2025-11-09 23:36:23 +00:00 committed by GitHub
commit ab91100e38
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 41 additions and 8 deletions

View file

@ -2,6 +2,8 @@ name: Release
on:
push:
branches:
- '**'
tags:
- 'v*.*.*'
@ -11,11 +13,38 @@ permissions:
issues: write
id-token: write
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:
name: Release
needs: test
runs-on: ubuntu-latest
if: github.ref_type == 'tag'
steps:
- name: Checkout
uses: actions/checkout@v4
@ -32,11 +61,11 @@ jobs:
with:
node-version: '20'
# - name: Build UI
# run: |
# cd ui
# npm install
# npm run build
# - name: Build UI
# run: |
# cd ui
# npm install
# npm run build
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v6

View file

@ -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..."

View file

@ -3,9 +3,9 @@
[![Go Version](https://img.shields.io/badge/go-1.24+-blue.svg)](https://golang.org)
[![GoDoc](https://pkg.go.dev/badge/github.com/Snider/Mining.svg)](https://pkg.go.dev/github.com/Snider/Mining)
[![Go Report Card](https://goreportcard.com/badge/github.com/Snider/Mining)](https://goreportcard.com/report/github.com/Snider/Mining)
[![License: EUPL-1.2](https://img.shields.io/badge/License-EUPL--1.2-blue.svg)](https://opensource.org/license/eupl-1-2)
[![Release](https://img.shields.io/github/release/Snider/Mining.svg)](https://github.com/Snider/Mining/releases)
[![codecov](https://codecov.io/gh/Snider/Mining/branch/main/graph/badge.svg)](https://codecov.io/gh/Snider/Mining)
[![Release](https://img.shields.io/github/release/Snider/Mining.svg)](https://github.com/Snider/Mining/releases)
[![License: EUPL-1.2](https://img.shields.io/badge/License-EUPL--1.2-blue.svg)](https://opensource.org/license/eupl-1-2)
GoLang Miner management with RESTful control - A modern, modular package for managing cryptocurrency miners.