fix: sonar configs (#370) #48
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: Lint & Test & Build & Release | |
| on: | |
| push: | |
| tags: | |
| - 'v*' | |
| branches: | |
| - "!*" | |
| jobs: | |
| build: | |
| strategy: | |
| fail-fast: false | |
| max-parallel: 2 | |
| matrix: | |
| os: [ 'ubuntu-24.04' ] | |
| go-version: [1.24] | |
| runs-on: ${{ matrix.os }} | |
| name: Build | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up go | |
| uses: actions/[email protected] | |
| with: | |
| go-version: ${{ matrix.go-version }} | |
| - run: | | |
| go version | |
| shell: bash | |
| - name: Set up cache | |
| uses: actions/cache@v4 | |
| env: | |
| cache-name: cache-vendored-tools-${{ secrets.CACHE_VERSION }} | |
| with: | |
| path: | | |
| ${{ env.GOBIN }} | |
| ~/.cache/go-build | |
| ~/go/pkg/mod | |
| key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/tools/go.sum') }} | |
| restore-keys: | | |
| ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/tools/go.sum') }} | |
| - name: Install tools | |
| run: | | |
| make install-tools | |
| shell: bash | |
| - name: Build | |
| run: | | |
| make build | |
| regression_test: | |
| strategy: | |
| fail-fast: false | |
| max-parallel: 2 | |
| matrix: | |
| os: [ 'ubuntu-24.04' ] | |
| go-version: [1.24] | |
| runs-on: ${{ matrix.os }} | |
| name: Regression tests | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up go | |
| uses: actions/[email protected] | |
| with: | |
| go-version: ${{ matrix.go-version }} | |
| - run: | | |
| go version | |
| shell: bash | |
| - name: Set up cache | |
| uses: actions/cache@v4 | |
| env: | |
| cache-name: cache-vendored-tools-${{ secrets.CACHE_VERSION }} | |
| with: | |
| path: | | |
| ${{ env.GOBIN }} | |
| ~/.cache/go-build | |
| ~/go/pkg/mod | |
| key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/tools/go.sum') }} | |
| restore-keys: | | |
| ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/tools/go.sum') }} | |
| - name: Install tools | |
| run: | | |
| make install-tools | |
| shell: bash | |
| - name: Run regression tests | |
| env: | |
| AOC_SESSION: ${{ secrets.AOC_SESSION }} | |
| run: | | |
| make test-regression | |
| shell: bash | |
| linting: | |
| strategy: | |
| fail-fast: false | |
| max-parallel: 1 | |
| matrix: | |
| os: [ 'ubuntu-24.04' ] | |
| go-version: [1.24] | |
| runs-on: ${{ matrix.os }} | |
| name: Lint | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up go | |
| uses: actions/[email protected] | |
| with: | |
| go-version: ${{ matrix.go-version }} | |
| - run: | | |
| go version | |
| shell: bash | |
| - name: Set up cache | |
| uses: actions/cache@v4 | |
| env: | |
| cache-name: cache-vendored-tools-${{ secrets.CACHE_VERSION }} | |
| with: | |
| path: | | |
| ${{ env.GOBIN }} | |
| ~/.cache/go-build | |
| ~/go/pkg/mod | |
| key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/tools/go.sum') }} | |
| restore-keys: | | |
| ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/tools/go.sum') }} | |
| - name: Install tools | |
| run: | | |
| make install-tools | |
| shell: bash | |
| - name: Vet | |
| run: | | |
| make vet | |
| shell: bash | |
| - name: Lint | |
| run: | | |
| make lint-pipeline | |
| shell: bash | |
| release: | |
| needs: [ build, regression_test, linting ] | |
| strategy: | |
| fail-fast: false | |
| max-parallel: 1 | |
| matrix: | |
| os: [ 'ubuntu-24.04' ] | |
| go-version: [1.24] | |
| runs-on: ${{ matrix.os }} | |
| name: Release | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up go | |
| uses: actions/[email protected] | |
| with: | |
| go-version: ${{ matrix.go-version }} | |
| - run: | | |
| go version | |
| shell: bash | |
| - name: Install GoReleaser | |
| uses: goreleaser/goreleaser-action@v6 | |
| with: | |
| install-only: true | |
| - name: Run GoReleaser | |
| if: success() | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| make release | |
| shell: bash |