diff --git a/.github/workflows/backend-tests.yml b/.github/workflows/backend-tests.yml index a7fea7f1d2..aa00af8ebe 100644 --- a/.github/workflows/backend-tests.yml +++ b/.github/workflows/backend-tests.yml @@ -15,7 +15,7 @@ on: jobs: test: name: Run Backend Tests - runs-on: ubuntu-latest + runs-on: homelab-runner defaults: run: working-directory: apps/backend @@ -25,16 +25,22 @@ jobs: uses: actions/checkout@v4 - name: Set up Go + if: ${{ !contains(runner.name, 'homelab') }} uses: actions/setup-go@v6 with: go-version-file: apps/backend/go.mod cache-dependency-path: apps/backend/go.sum - - name: Download dependencies - run: go mod download - - - name: Verify dependencies - run: go mod verify + - name: Cache Go modules + if: ${{ contains(runner.name, 'homelab') }} + uses: actions/cache@v4 + with: + 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 run: go build -v ./cmd/kandev @@ -42,11 +48,11 @@ jobs: - name: Run golangci-lint uses: golangci/golangci-lint-action@v9 with: - version: v2.6 + version: v2.9 args: ./... working-directory: apps/backend - - name: Run tests with coverage + - name: Run tests run: | set -o pipefail go test -v -race -coverprofile=coverage.out -covermode=atomic -json ./... 2>&1 | tee test-results.json @@ -57,15 +63,6 @@ jobs: with: 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 uses: actions/upload-artifact@v4 if: always() diff --git a/.github/workflows/frontend-tests.yml b/.github/workflows/frontend-tests.yml index eeffccd821..673b393630 100644 --- a/.github/workflows/frontend-tests.yml +++ b/.github/workflows/frontend-tests.yml @@ -19,7 +19,7 @@ on: jobs: frontend: name: Run Frontend Lint, Tests, and Build - runs-on: ubuntu-latest + runs-on: homelab-runner defaults: run: working-directory: apps diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml deleted file mode 100644 index 37c01a1740..0000000000 --- a/.github/workflows/test.yml +++ /dev/null @@ -1,7 +0,0 @@ -name: Test -on: workflow_dispatch -jobs: - test: - runs-on: homelab-runner - steps: - - run: echo "hello from homelab" diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index ce9d2cd216..366bfb0b53 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -5,18 +5,16 @@ repos: - id: go-tests name: Go tests (backend) entry: bash -c 'cd apps/backend && go test ./...' - language: golang + language: system files: \.go$ pass_filenames: false - additional_dependencies: [] - id: go-lint name: Go Lint (backend) entry: bash -c 'cd apps/backend && golangci-lint run' - language: golang + language: system files: \.go$ pass_filenames: false - additional_dependencies: [] # Web app (TypeScript/React) hooks - repo: local diff --git a/apps/backend/go.mod b/apps/backend/go.mod index 9557cdd1fd..355c0d27c7 100644 --- a/apps/backend/go.mod +++ b/apps/backend/go.mod @@ -1,8 +1,6 @@ module github.com/kandev/kandev -go 1.24.0 - -toolchain go1.24.11 +go 1.26.0 require ( github.com/UserExistsError/conpty v0.1.4