fix: more rix fixes #1287
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 | |
| - release-* | |
| pull_request: {} | |
| env: | |
| # Common versions | |
| GOLANGCI_VERSION: 'v2.7.2' | |
| jobs: | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| - name: Setup Go | |
| uses: actions/setup-go@v4 | |
| with: | |
| go-version-file: "go.mod" | |
| - name: Find the Go Cache | |
| id: go | |
| run: | | |
| echo "build-cache=$(go env GOCACHE)" >> $GITHUB_OUTPUT | |
| echo "mod-cache=$(go env GOMODCACHE)" >> $GITHUB_OUTPUT | |
| - name: Cache the Go Build Cache | |
| uses: actions/cache@v3 | |
| with: | |
| path: ${{ steps.go.outputs.build-cache }} | |
| key: ${{ runner.os }}-build-${{ github.sha }}-${{ hashFiles('**/go.sum') }} | |
| - name: Cache Go Dependencies | |
| uses: actions/cache@v3 | |
| with: | |
| path: ${{ steps.go.outputs.mod-cache }} | |
| key: ${{ runner.os }}-mod-${{ github.sha }}-${{ hashFiles('**/go.sum') }} | |
| - name: Lint | |
| uses: golangci/golangci-lint-action@v7 | |
| with: | |
| version: ${{ env.GOLANGCI_VERSION }} | |
| skip-cache: true | |
| skip-save-cache: true | |
| args: --timeout=30m | |
| check-diff: | |
| runs-on: ubuntu-latest | |
| if: github.ref != 'refs/heads/main' | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| - name: Setup Go | |
| uses: actions/setup-go@v4 | |
| id: setup-go | |
| with: | |
| go-version-file: "go.mod" | |
| - name: Download Go modules | |
| if: ${{ steps.setup-go.outputs.cache-hit != 'true' }} | |
| run: go mod download | |
| - name: Configure Git | |
| run: | | |
| git config user.name "$GITHUB_ACTOR" | |
| git config user.email "$GITHUB_ACTOR@users.noreply.github.com" | |
| - name: Check Diff | |
| run: | | |
| make check-diff | |
| unit-tests: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| - name: Fetch History | |
| run: git fetch --prune --unshallow | |
| - name: Setup Go | |
| uses: actions/setup-go@v4 | |
| with: | |
| go-version-file: "go.mod" | |
| - name: Find the Go Cache | |
| id: go | |
| run: | | |
| echo "build-cache=$(go env GOCACHE)" >> $GITHUB_OUTPUT | |
| echo "mod-cache=$(go env GOMODCACHE)" >> $GITHUB_OUTPUT | |
| - name: Cache the Go Build Cache | |
| uses: actions/cache@v3 | |
| with: | |
| path: ${{ steps.go.outputs.build-cache }} | |
| key: ${{ runner.os }}-build-${{ github.sha }}-${{ hashFiles('**/go.sum') }} | |
| - name: Cache Go Dependencies | |
| uses: actions/cache@v3 | |
| with: | |
| path: ${{ steps.go.outputs.mod-cache }} | |
| key: ${{ runner.os }}-mod-${{ github.sha }}-${{ hashFiles('**/go.sum') }} | |
| - name: Generate Swagger Docs | |
| run: | | |
| make swag | |
| - name: Run Unit Tests | |
| run: | | |
| make test | |
| integration-tests: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| - name: Fetch History | |
| run: git fetch --prune --unshallow | |
| - name: Setup Go | |
| uses: actions/setup-go@v4 | |
| with: | |
| go-version-file: "go.mod" | |
| - name: Find the Go Cache | |
| id: go | |
| run: | | |
| echo "build-cache=$(go env GOCACHE)" >> $GITHUB_OUTPUT | |
| echo "mod-cache=$(go env GOMODCACHE)" >> $GITHUB_OUTPUT | |
| - name: Cache the Go Build Cache | |
| uses: actions/cache@v3 | |
| with: | |
| path: ${{ steps.go.outputs.build-cache }} | |
| key: ${{ runner.os }}-build-${{ github.sha }}-${{ hashFiles('**/go.sum') }} | |
| - name: Cache Go Dependencies | |
| uses: actions/cache@v3 | |
| with: | |
| path: ${{ steps.go.outputs.mod-cache }} | |
| key: ${{ runner.os }}-mod-${{ github.sha }}-${{ hashFiles('**/go.sum') }} | |
| - name: Generate Swagger Docs | |
| run: | | |
| make swag | |
| - name: Run Unit Tests | |
| run: | | |
| make test-integration |