mirror of
https://github.com/jetkvm/kvm.git
synced 2026-05-21 05:20:35 +00:00
db4452d0bb
Replace 5 workflow files with 2 clean ones: - lint.yml: Go lint and UI lint as parallel jobs with consistent push + pull_request triggers (fixes fork PRs never getting UI lint) - build.yml: stripped to compile + test only, with pull_request trigger added (PRs now get build feedback before merge) Removed: - stale-issues.yml (permanent dry-run no-op) - smoketest.yml (frequently failing device tests) - dependabot.yml (automated dependency bumps) - golangci-lint.yml (folded into lint.yml) - ui-lint.yml (folded into lint.yml) Also fixed build.yml cache restore-keys to use a proper prefix fallback instead of duplicating the full key.
46 lines
1.5 KiB
YAML
46 lines
1.5 KiB
YAML
name: build
|
|
on:
|
|
push:
|
|
branches: [dev, main]
|
|
pull_request:
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
build:
|
|
name: Build and test
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v5
|
|
- name: Prepare Docker build context
|
|
run: ./scripts/ci_helper.sh prepare
|
|
- uses: docker/setup-buildx-action@v3
|
|
- uses: docker/build-push-action@v6
|
|
with:
|
|
context: ${{ env.DOCKER_BUILD_CONTEXT_DIR }}
|
|
file: ${{ env.DOCKER_BUILD_CONTEXT_DIR }}/Dockerfile.build
|
|
tags: ${{ env.DOCKER_BUILD_TAG }}
|
|
push: false
|
|
load: true
|
|
- uses: actions/cache@v5
|
|
with:
|
|
path: internal/native/cgo/build
|
|
key: jetkvm-cgo-${{ hashFiles('internal/native/cgo/**/*.c', 'internal/native/cgo/**/*.h', 'internal/native/cgo/**/*.patch', 'internal/native/cgo/**/*.txt', 'internal/native/cgo/**/*.sh', '!internal/native/cgo/build/**') }}
|
|
restore-keys: jetkvm-cgo-
|
|
- uses: actions/setup-node@v6
|
|
with:
|
|
node-version: "22"
|
|
cache: npm
|
|
cache-dependency-path: "**/package-lock.json"
|
|
- uses: actions/setup-go@v6
|
|
with:
|
|
go-version: "^1.25.1"
|
|
- name: Build frontend
|
|
run: make frontend
|
|
- name: Build application
|
|
run: ./scripts/ci_helper.sh make build_dev
|
|
- name: Run tests
|
|
run: go test ./... -json > testreport.json
|
|
- uses: becheran/go-testreport@v0.3.2
|
|
with:
|
|
input: testreport.json
|