bump memiavl #1412
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 | |
| # This workflow is run on every pull request and push to master | |
| # The `golangci` will pass without running if no *.{go, mod, sum} files have been changed. | |
| on: | |
| pull_request: | |
| paths: | |
| - "**.go" | |
| - "go.mod" | |
| - "go.sum" | |
| push: | |
| branches: | |
| - main | |
| - "release/*" | |
| paths: | |
| - "**.go" | |
| - "go.mod" | |
| - "go.sum" | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| golangci: | |
| env: | |
| GOLANGCI_LINT_VERSION: v2.11.4 | |
| name: golangci-lint | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: actions/setup-go@v5 | |
| with: | |
| go-version: 1.24 | |
| check-latest: true | |
| - uses: technote-space/get-diff-action@v6.1.2 | |
| id: git_diff | |
| with: | |
| PATTERNS: | | |
| **/**.go | |
| go.mod | |
| go.sum | |
| # install golangci-lint | |
| - run: go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@${GOLANGCI_LINT_VERSION} | |
| - name: run go linters (long) | |
| if: env.GIT_DIFF | |
| id: lint_long | |
| run: | | |
| make lint | |
| env: | |
| GIT_DIFF: ${{ env.GIT_DIFF }} | |
| - uses: technote-space/get-diff-action@v6.1.2 | |
| if: steps.lint_long.outcome == 'skipped' | |
| with: | |
| PATTERNS: | | |
| **/**.go | |
| go.mod | |
| go.sum | |
| - name: run go linters (short) | |
| if: steps.lint_long.outcome == 'skipped' && env.GIT_DIFF | |
| run: | | |
| make lint | |
| env: | |
| GIT_DIFF: ${{ env.GIT_DIFF }} | |
| LINT_DIFF: 1 | |
| format: | |
| runs-on: ubuntu-22.04 | |
| name: format | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Setup go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: 1.24 | |
| check-latest: true | |
| - uses: technote-space/get-diff-action@v6.1.2 | |
| id: git_diff | |
| with: | |
| PATTERNS: | | |
| **/**.go | |
| go.mod | |
| go.sum | |
| - name: install format tools | |
| if: env.GIT_DIFF | |
| run: | | |
| go install github.com/client9/misspell/cmd/misspell@v0.3.4 | |
| go install golang.org/x/tools/cmd/goimports@latest | |
| env: | |
| GIT_DIFF: ${{ env.GIT_DIFF }} | |
| - name: run format | |
| if: env.GIT_DIFF | |
| run: | | |
| make format | |
| CHANGES_IN_REPO=$(git status --porcelain) | |
| if [[ -n "$CHANGES_IN_REPO" ]]; then | |
| echo "Repository is dirty after 'make format'. Showing 'git status' and 'git --no-pager diff' for debugging now:" | |
| git status && git --no-pager diff | |
| exit 1 | |
| fi | |
| env: | |
| GIT_DIFF: ${{ env.GIT_DIFF }} | |
| # Use --check or --exit-code when available (Go 1.19?) | |
| # https://github.com/golang/go/issues/27005 | |
| tidy: | |
| runs-on: ubuntu-22.04 | |
| name: tidy | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Setup go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: 1.24 | |
| check-latest: true | |
| - run: | | |
| go mod tidy | |
| CHANGES_IN_REPO=$(git status --porcelain) | |
| if [[ -n "$CHANGES_IN_REPO" ]]; then | |
| echo "Repository is dirty. Showing 'git status' and 'git --no-pager diff' for debugging now:" | |
| git status && git --no-pager diff | |
| exit 1 | |
| fi |