feat: add K8s scheduling options, image pull secrets, and dedicated m… #29
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| pull_request: | |
| branches: [main] | |
| push: | |
| branches: [main] | |
| permissions: read-all | |
| env: | |
| GO_VERSION: "1.26.0" | |
| jobs: | |
| test: | |
| name: Test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: ${{ env.GO_VERSION }} | |
| - name: Run vet | |
| run: go vet ./... | |
| - name: Run tests | |
| run: go test ./... -count=1 -race | |
| lint: | |
| name: Lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: ${{ env.GO_VERSION }} | |
| - name: Run golangci-lint | |
| uses: golangci/golangci-lint-action@v8 | |
| with: | |
| version: v2.10.1 | |
| build-check: | |
| name: Build Check | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: ${{ env.GO_VERSION }} | |
| - name: Build CLI | |
| run: make build-cli | |
| - name: Build autobenchmark controller | |
| run: make build-autobenchmark-ctl | |
| - name: Build benchmark dashboard | |
| run: make build-benchmark-dashboard | |
| copyright-check: | |
| name: Copyright Check | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Determine base ref | |
| id: base | |
| run: | | |
| if [ "${{ github.event_name }}" = "pull_request" ]; then | |
| echo "ref=origin/${{ github.base_ref }}" >> "$GITHUB_OUTPUT" | |
| else | |
| echo "ref=HEAD^1" >> "$GITHUB_OUTPUT" | |
| fi | |
| - name: Check copyright headers | |
| env: | |
| BASE_REF: ${{ steps.base.outputs.ref }} | |
| run: | | |
| set -euo pipefail | |
| if [ "$BASE_REF" != "HEAD^1" ]; then | |
| git fetch origin "${{ github.base_ref }}" | |
| fi | |
| ./tools/check-copyright-on-pr-go-files.sh --base-ref "$BASE_REF" | |
| version-check: | |
| name: Version Check | |
| if: github.event_name == 'pull_request' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Validate VERSION file | |
| run: | | |
| if [ ! -f VERSION ]; then | |
| echo "Error: VERSION file not found" | |
| exit 1 | |
| fi | |
| VERSION=$(tr -d '[:space:]' < VERSION) | |
| if ! echo "$VERSION" | grep -qE '^[0-9]+\.[0-9]+\.[0-9]+(-[a-zA-Z0-9.]+)?$'; then | |
| echo "Error: VERSION file contains invalid semver: '$VERSION'" | |
| echo "Expected format: MAJOR.MINOR.PATCH (e.g., 0.8.0)" | |
| exit 1 | |
| fi | |
| echo "VERSION file is valid: $VERSION" |