test: add e2e #993
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: PR Checks | |
| on: # yamllint disable-line rule:truthy | |
| pull_request: | |
| # default permissions as read only | |
| permissions: read-all | |
| jobs: | |
| check-changes: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| changes: ${{ steps.filter.outputs.changes }} | |
| steps: | |
| - name: checkout source | |
| uses: actions/checkout@v6 | |
| - name: filter changes | |
| uses: dorny/paths-filter@v3 | |
| id: filter | |
| with: | |
| filters: | | |
| changes: | |
| - '**/*.go' | |
| - 'go.mod' | |
| - 'go.sum' | |
| - 'Makefile' | |
| fmt: | |
| needs: check-changes | |
| if: needs.check-changes.outputs.changes == 'true' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: checkout source | |
| uses: actions/checkout@v6 | |
| - name: setup go | |
| uses: actions/[email protected] | |
| with: | |
| go-version-file: go.mod | |
| - name: make fmt | |
| shell: bash | |
| run: make fmt && git diff --exit-code | |
| lint: | |
| needs: check-changes | |
| if: needs.check-changes.outputs.changes == 'true' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: checkout source | |
| uses: actions/checkout@v6 | |
| - name: setup go | |
| uses: actions/[email protected] | |
| with: | |
| go-version-file: go.mod | |
| cache: false | |
| - name: golangci-lint | |
| uses: golangci/golangci-lint-action@v9 | |
| with: | |
| version: v2.1.6 | |
| args: --timeout=3m --issues-exit-code=0 ./... | |
| only-new-issues: true | |
| vet: | |
| needs: check-changes | |
| if: needs.check-changes.outputs.changes == 'true' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: checkout source | |
| uses: actions/checkout@v6 | |
| - name: setup go | |
| uses: actions/[email protected] | |
| with: | |
| go-version-file: go.mod | |
| cache: false | |
| - name: make vet | |
| shell: bash | |
| run: make vet && git diff --exit-code | |
| docs: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: checkout source | |
| uses: actions/checkout@v6 | |
| - name: setup go | |
| uses: actions/[email protected] | |
| with: | |
| go-version-file: go.mod | |
| cache: false | |
| - name: make gen-metrics-docs | |
| shell: bash | |
| run: make gen-metrics-docs && git diff --exit-code | |
| test-and-codecov: | |
| needs: check-changes | |
| if: needs.check-changes.outputs.changes == 'true' && github.actor != 'dependabot[bot]' | |
| permissions: | |
| contents: read | |
| uses: ./.github/workflows/test-and-codecov.yaml | |
| secrets: | |
| CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
| scorecard: | |
| permissions: | |
| contents: read | |
| security-events: write | |
| id-token: write | |
| uses: ./.github/workflows/scorecard.yml | |
| pre-commit: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout source | |
| uses: actions/checkout@v6 | |
| - name: Setup Python | |
| uses: actions/setup-python@v6 | |
| - name: Setup Pre-commit | |
| run: pip install pre-commit | |
| - name: Run Pre-commit | |
| run: pre-commit run --all-files | |
| commit-msg-check: | |
| # NOTE: Skipping the commit-msg check for dependabot PRs | |
| if: ${{ !startsWith(github.actor, 'dependabot') }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout source | |
| uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 # Fetch all the history of PR commits | |
| - name: Setup Pre-commit | |
| run: pip install pre-commit | |
| - name: Run Pre-commit | |
| run: pre-commit run --hook-stage manual pr-commit-lint --all-files | |
| env: | |
| FROM: ${{ github.event.pull_request.base.sha }} | |
| TO: ${{ github.event.pull_request.head.sha }} | |
| build-images: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: checkout source | |
| uses: actions/checkout@v6 | |
| - name: setup go | |
| uses: actions/[email protected] | |
| with: | |
| go-version-file: go.mod | |
| cache: false | |
| - name: build images for PR checks | |
| uses: ./.github/publish-image | |
| with: | |
| registry: localhost:5001 | |
| build-and-deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout source | |
| uses: actions/checkout@v6 | |
| - name: Build and Deploy Kepler on K8s | |
| uses: ./.github/k8s | |
| compose-deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout source | |
| uses: actions/checkout@v6 | |
| - name: Build and Deploy Kepler using Docker Compose | |
| uses: ./.github/compose |