Files
Erupe/.github/workflows/go.yml
Houmgaor de00e41830 chore: fix typos, remove stale comment, and update codecov-action to v4
- Remove misleading "For Debuging" comment in sys_session.go
- Fix "offical" → "official" typo in handlers_session.go
- Update codecov-action@v3 → @v4 in CI workflow
- Consolidate technical-debt.md with completed items and updated TOC
2026-02-22 18:20:09 +01:00

118 lines
2.2 KiB
YAML

name: Build and Test
on:
push:
branches:
- main
- develop
- 'fix-*'
- 'feature-*'
paths:
- 'common/**'
- 'config/**'
- 'network/**'
- 'server/**'
- 'go.mod'
- 'go.sum'
- 'main.go'
- '.github/workflows/go.yml'
pull_request:
branches:
- main
- develop
permissions:
contents: read
jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.25'
- name: Download dependencies
run: go mod download
- name: Run Tests with Race Detector and Coverage
run: go test -race -coverprofile=coverage.out ./... -timeout=10m
- name: Upload Coverage to Codecov
uses: codecov/codecov-action@v4
with:
files: ./coverage.out
flags: unittests
name: codecov-umbrella
build:
name: Build
needs: [test, lint]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.25'
- name: Download dependencies
run: go mod download
- name: Build Linux-amd64
run: env GOOS=linux GOARCH=amd64 go build -v
- name: Upload Linux-amd64 artifacts
uses: actions/upload-artifact@v4
with:
name: Linux-amd64
path: |
./erupe-ce
./config.json
./www/
./savedata/
./bin/
./bundled-schema/
retention-days: 7
- name: Build Windows-amd64
run: env GOOS=windows GOARCH=amd64 go build -v
- name: Upload Windows-amd64 artifacts
uses: actions/upload-artifact@v4
with:
name: Windows-amd64
path: |
./erupe-ce.exe
./config.json
./www/
./savedata/
./bin/
./bundled-schema/
retention-days: 7
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.25'
- name: Run golangci-lint
uses: golangci/golangci-lint-action@v7
with:
version: v2.10.1
args: --timeout=5m