feat: homelab-runner (#233)

This commit is contained in:
Carlos Florêncio
2026-02-16 23:22:18 +00:00
committed by GitHub
parent bfdd48b7ad
commit acaae931e2
5 changed files with 18 additions and 32 deletions
+14 -17
View File
@@ -15,7 +15,7 @@ on:
jobs: jobs:
test: test:
name: Run Backend Tests name: Run Backend Tests
runs-on: ubuntu-latest runs-on: homelab-runner
defaults: defaults:
run: run:
working-directory: apps/backend working-directory: apps/backend
@@ -25,16 +25,22 @@ jobs:
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: Set up Go - name: Set up Go
if: ${{ !contains(runner.name, 'homelab') }}
uses: actions/setup-go@v6 uses: actions/setup-go@v6
with: with:
go-version-file: apps/backend/go.mod go-version-file: apps/backend/go.mod
cache-dependency-path: apps/backend/go.sum cache-dependency-path: apps/backend/go.sum
- name: Download dependencies - name: Cache Go modules
run: go mod download if: ${{ contains(runner.name, 'homelab') }}
uses: actions/cache@v4
- name: Verify dependencies with:
run: go mod verify path: |
~/go/pkg/mod
~/.cache/go-build
~/.cache/golangci-lint
key: go-${{ runner.os }}-${{ hashFiles('apps/backend/go.sum') }}
restore-keys: go-${{ runner.os }}-
- name: Build - name: Build
run: go build -v ./cmd/kandev run: go build -v ./cmd/kandev
@@ -42,11 +48,11 @@ jobs:
- name: Run golangci-lint - name: Run golangci-lint
uses: golangci/golangci-lint-action@v9 uses: golangci/golangci-lint-action@v9
with: with:
version: v2.6 version: v2.9
args: ./... args: ./...
working-directory: apps/backend working-directory: apps/backend
- name: Run tests with coverage - name: Run tests
run: | run: |
set -o pipefail set -o pipefail
go test -v -race -coverprofile=coverage.out -covermode=atomic -json ./... 2>&1 | tee test-results.json go test -v -race -coverprofile=coverage.out -covermode=atomic -json ./... 2>&1 | tee test-results.json
@@ -57,15 +63,6 @@ jobs:
with: with:
fromJSONFile: apps/backend/test-results.json fromJSONFile: apps/backend/test-results.json
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
if: always()
with:
files: apps/backend/coverage.out
flags: backend
name: backend-coverage
fail_ci_if_error: false
- name: Upload test artifacts - name: Upload test artifacts
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
if: always() if: always()
+1 -1
View File
@@ -19,7 +19,7 @@ on:
jobs: jobs:
frontend: frontend:
name: Run Frontend Lint, Tests, and Build name: Run Frontend Lint, Tests, and Build
runs-on: ubuntu-latest runs-on: homelab-runner
defaults: defaults:
run: run:
working-directory: apps working-directory: apps
-7
View File
@@ -1,7 +0,0 @@
name: Test
on: workflow_dispatch
jobs:
test:
runs-on: homelab-runner
steps:
- run: echo "hello from homelab"
+2 -4
View File
@@ -5,18 +5,16 @@ repos:
- id: go-tests - id: go-tests
name: Go tests (backend) name: Go tests (backend)
entry: bash -c 'cd apps/backend && go test ./...' entry: bash -c 'cd apps/backend && go test ./...'
language: golang language: system
files: \.go$ files: \.go$
pass_filenames: false pass_filenames: false
additional_dependencies: []
- id: go-lint - id: go-lint
name: Go Lint (backend) name: Go Lint (backend)
entry: bash -c 'cd apps/backend && golangci-lint run' entry: bash -c 'cd apps/backend && golangci-lint run'
language: golang language: system
files: \.go$ files: \.go$
pass_filenames: false pass_filenames: false
additional_dependencies: []
# Web app (TypeScript/React) hooks # Web app (TypeScript/React) hooks
- repo: local - repo: local
+1 -3
View File
@@ -1,8 +1,6 @@
module github.com/kandev/kandev module github.com/kandev/kandev
go 1.24.0 go 1.26.0
toolchain go1.24.11
require ( require (
github.com/UserExistsError/conpty v0.1.4 github.com/UserExistsError/conpty v0.1.4