Phase 6 #67
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: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| lint: | |
| name: Lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: "1.23" | |
| cache: true | |
| - name: Download golangci-lint | |
| run: make golangci-lint | |
| - name: Run golangci-lint | |
| run: make lint | |
| test: | |
| name: Unit & Integration Tests | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: "1.23" | |
| cache: true | |
| - name: Download envtest binaries | |
| run: make envtest | |
| - name: Run tests | |
| run: make test | |
| - name: Upload coverage | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: coverage | |
| path: cover.out | |
| helm-lint: | |
| name: Helm Lint & Dry-run | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Helm | |
| uses: azure/setup-helm@v4 | |
| with: | |
| version: v3.14.0 | |
| - name: Lint Helm Chart | |
| run: helm lint charts/agentrax/ | |
| - name: Template Helm Chart | |
| run: helm template test charts/agentrax/ --debug | |
| build: | |
| name: Docker Build | |
| runs-on: ubuntu-latest | |
| needs: [lint, test, helm-lint] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up QEMU (cross-platform) | |
| uses: docker/setup-qemu-action@v3 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Build image (no push on PRs) | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: . | |
| platforms: linux/amd64,linux/arm64 | |
| push: false | |
| tags: ghcr.io/gitcommitankit/agentrax:${{ github.sha }} | |
| cache-from: type=gha | |
| cache-to: type=gha,mode=max | |
| e2e: | |
| name: End-to-End Tests (kind) | |
| runs-on: ubuntu-latest | |
| needs: [build] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: "1.23" | |
| cache: true | |
| - name: Create kind Cluster | |
| uses: helm/[email protected] | |
| with: | |
| cluster_name: agentrax-e2e | |
| - name: Install cluster dependencies | |
| run: make deploy-deps | |
| - name: Run E2E Tests | |
| run: make test-e2e |