Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 9 additions & 14 deletions .github/workflows/pre-merge.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,14 @@ jobs:
is-latest: false
is-stable: false

go-generate:
runs-on: ubuntu-26.04
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Set up Go
uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0
with:
go-version-file: 'go.mod'
- name: Verify generated mocks are up to date
run: |
go generate ./...
git diff --exit-code
go-generated:
# On a Renovate branch, pushes the regenerated mocks itself.
uses: scality/workflows/.github/workflows/go-generated.yaml@1c3bb83b992d0a512c08755606ee6439b26c463b # v2.13.0
secrets:
ACTIONS_APP_PRIVATE_KEY: ${{ secrets.ACTIONS_APP_PRIVATE_KEY }}
with:
push-to-renovate-branches: true
actions-app-id: ${{ vars.ACTIONS_APP_ID }}

lint:
runs-on: ubuntu-26.04
Expand Down Expand Up @@ -72,7 +67,7 @@ jobs:
if: always()
needs:
- build
- go-generate
- go-generated
- lint
- test
- test-e2e
Expand Down
4 changes: 3 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,9 @@ owns its responsibility:
errors.CausedBy(rawErr))` so `errors.Is` keeps matching the category.
- **Tests**: Ginkgo + Gomega. Mocks for the `service` ports are generated by
mockery (`go generate ./...`) and committed; never edit them by hand. CI
fails if the committed mocks are stale.
runs `go mod tidy` and `go generate ./...` and fails if the result differs
from what is committed. On `renovate/*` branches, it pushes the regenerated
code itself.
- **Linting & formatting**: `golangci-lint run` must pass; format with
`golangci-lint fmt`.

Expand Down
Loading