Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
220 changes: 0 additions & 220 deletions .githooks/README.md

This file was deleted.

44 changes: 0 additions & 44 deletions .githooks/pre-push

This file was deleted.

63 changes: 0 additions & 63 deletions .githooks/setup.sh

This file was deleted.

45 changes: 23 additions & 22 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,29 +107,9 @@ jobs:
go tool cover -func=coverage-integration.out | grep total | awk '{print "Integration test coverage: " $3}'
fi

# Threshold lives in the Makefile (COVERAGE_THRESHOLD) so local and CI gates agree.
- name: Check coverage threshold
run: |
if [ ! -f coverage.out ]; then
echo "::error::Coverage file not found"
exit 1
fi

COVERAGE=$(go tool cover -func=coverage.out | grep total | awk '{print $3}' | sed 's/%//')

if [ -z "$COVERAGE" ]; then
echo "::error::Failed to extract coverage percentage"
exit 1
fi

THRESHOLD=70
echo "Current coverage: ${COVERAGE}%"
echo "Minimum threshold: ${THRESHOLD}%"

if (( $(echo "$COVERAGE < $THRESHOLD" | bc -l) )); then
echo "::error::Coverage ${COVERAGE}% is below minimum threshold of ${THRESHOLD}%"
exit 1
fi
echo "Coverage check passed!"
run: make coverage-threshold COVERAGE_PROFILE=coverage.out

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5
Expand Down Expand Up @@ -219,6 +199,12 @@ jobs:
cd cmd/overlay-test-server
go build -o ../../bin/overlay-test-server

- name: Build node-doctor-controller binary
run: |
mkdir -p bin
cd cmd/node-doctor-controller
go build -o ../../bin/node-doctor-controller

- name: Test binary
run: ./bin/node-doctor --version

Expand Down Expand Up @@ -293,6 +279,21 @@ jobs:
cache-from: type=gha
cache-to: type=gha,mode=max

- name: Build controller Docker image (no push)
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile.controller
platforms: linux/amd64
push: false
tags: ${{ env.REGISTRY }}/node-doctor-controller:ci-${{ github.sha }}
build-args: |
VERSION=${{ steps.meta.outputs.VERSION }}
GIT_COMMIT=${{ steps.meta.outputs.GIT_COMMIT }}
BUILD_TIME=${{ steps.meta.outputs.BUILD_TIME }}
cache-from: type=gha,scope=controller
cache-to: type=gha,mode=max,scope=controller

# Summary job - provides overall status
#
# New gating jobs are wired in here rather than added as new required status checks:
Expand Down
Loading
Loading