Skip to content

Fix CI: migrate the checks to the steps-check bundles - #38

Merged
gergely-sallai merged 4 commits into
masterfrom
fix-ci-migrate-to-steps-check-bundles
Oct 9, 2026
Merged

gergely-sallai merged 4 commits into
masterfrom
fix-ci-migrate-to-steps-check-bundles

Conversation

@gergely-sallai

@gergely-sallai gergely-sallai commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Checklist

  • I've read and followed the Contribution Guidelines
  • step.yml and README.md is updated with the changes (if needed)

Version

No version update required, this change only affects CI configuration. step.yml is reformatted but no value changes, and README.md regenerates identically.

Context

ci has been red on every build, including on untouched master. It fails in the Golint step before it lints anything:

$ go "get" "-u" "golang.org/x/lint/golint"
Failed to install golint: package iter: unrecognized import path "iter":
import path does not begin with hostname

iter has been a standard library package since Go 1.23. The step installs golint with an unversioned GOPATH-mode go get -u, which doesn't know that and tries to fetch it as a remote repository. golint itself has been deprecated and frozen since 2021, so this will never be fixed at the source. Errcheck and Go test were skipped as a result, so only the step's own integration tests were running.

Changes

Replace the legacy go-list / golint / errcheck / go-test chain with steps-check's shared config modules and the bundles they provide:

include:
- repository: steps-check
  branch: master
  path: step-metadata.bitrise.yml
- repository: steps-check
  branch: master
  path: golang.bitrise.yml
bundle / step replaces
yamlfmt, lint mode (see Decisions) new — nothing before
bundle::step-yml-audit the hand-rolled audit-this-step, plus step.yml JSON schema validation
bundle::golangci-lint (golangci_lint_version: 2.11.4) go-list, golint, errcheck
bundle::go-test go-test

Also dropped three workflows that were unreachable from ci and long dead: go-tests and _install-test-tools (installed golint from github.com/golang/lint, a path that has not existed in years), and dep-update (used dep). Plus a stray test: key inside the ci workflow.

step.yml is reformatted in its own commit: 96 of the 107 changed lines are the shared .ymlfmt setting indentless_arrays: true, which de-indents the whole inputs: list.

Investigation details

No code changes were needed — golangci-lint 2.11.4 with steps-check's config reports 0 issues, and go build / go test pass. go.mod stays at go 1.16.

Two things only surfaced once CI ran:

  1. The golangci-lint bundle fails on this app's stack. It installs with install.sh -b $(go env GOPATH)/bin and then calls the binary by name. Go is managed by asdf here, GOPATH/bin is not on PATH, and the bundle died with golangci-lint: command not found (exit 127). stepman and envman hit the same thing in their own golangci-lint steps and solve it with asdf reshim golang. The third commit exports the directory before the bundle runs — the smallest fix available from this repo, since the bundle is included from steps-check and cannot be adjusted locally. The real fix belongs upstream: the bundle should invoke the binary at the path it just installed it to. Any step repo on an asdf-managed stack will hit this.

  2. bundle::yamlfmt cannot fail without Unified CI. It runs yamlfmt in write mode (no -lint) and exits 0 regardless; steps-check's own check workflow pairs it with autofix-ci, which commits the reformatted files back. Without UCI there is no autofix, so the bundle would reformat a workspace nobody reads and discard the result — a check that cannot fail, guarding the step.yml reformat above. Raised by Copilot on Move steps-check off the stale golangci-lint-version branch steps-project-scanner#177 and confirmed to apply here.

Decisions

  • Keep the checks shared rather than localizing them. This is a step repo, so .golangci.yml and .ymlfmt are not copied in — the bundles fetch steps-check's at build time. (They are byte-identical to the ones the go-* library repos vendor.)
  • Do not use steps.bitrise.yml's check workflow. It pulls in readme-generator and autofix-ci, which need Unified CI secrets this app does not have. The bundles are used directly instead, as the step-repo guidance describes.
  • Call yamlfmt with -lint instead of bundle::yamlfmt. Deliberate deviation from the step-repo convention so the check can actually fail; the config is still fetched from steps-check, so there is one source of truth. A TODO marks it for reverting once this Step migrates to Unified CI.
  • The PATH workaround is its own commit, so it can be reverted alone once the bundle is fixed upstream.
  • include: uses the repo-slug form (repository: steps-check). The full-URL form is accepted by newer CLIs but mangled by the 2.4x line; this app's stack runs 2.42.2.

gergely-sallai and others added 4 commits October 8, 2026 09:47
The yamlfmt check that the next commit introduces enforces the shared
`.ymlfmt`, so step.yml is brought in line with it here rather than inside the
CI change.

Most of the diff is one mechanical reformat: `indentless_arrays: true` moves
the whole `inputs:` list from indented to indentless list items, which is 96
of the 107 changed lines and alters no values.

The rest is trailing whitespace. Six blank lines inside the `description`
block carried stray spaces, and three text lines ended with a single space.
Those spaces are inside a literal block scalar, so they are part of the
string: parsing both versions gives identical documents except `description`,
which differs only by those three trailing spaces. No line ended in two or
more spaces, so no markdown hard line break is lost and the rendered output
is unchanged.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
`ci` fails on every build, including on untouched master, in the `Golint`
step before it lints anything:

    $ go "get" "-u" "golang.org/x/lint/golint"
    Failed to install golint: package iter: unrecognized import path "iter":
    import path does not begin with hostname

`iter` is a standard library package since Go 1.23. The step installs golint
with an unversioned GOPATH-mode `go get -u`, which does not know that and
tries to fetch it as a remote repository. golint itself has been deprecated
and frozen since 2021, so this will not be fixed at the source. Errcheck and
Go test never ran, so only the step's own integration tests were being
exercised.

This is a step repo, so the checks stay in steps-check rather than being
localized: `include:` its yamlfmt, step-metadata and golang config modules
and call the bundles, with `golangci_lint_version` pinned here rather than
inherited from the deprecated `checks.bitrise.yml` `lint` workflow.

  bundle::yamlfmt         replaces nothing — new
  bundle::step-yml-audit  replaces the hand-rolled audit-this-step, and adds
                          step.yml JSON schema validation
  bundle::golangci-lint   replaces go-list, golint and errcheck
  bundle::go-test         replaces go-test

The four `_test_*` workflows are unchanged: they are the step's own
integration tests and are the part worth keeping.

Dropped along the way: `go-tests` and `_install-test-tools`, which installed
golint from the long-dead `github.com/golang/lint` path, and `dep-update`,
which used `dep`. None were reachable from `ci`. The stray `test:` key inside
the `ci` workflow goes too.

format_version 5 -> 13, which the `include:` and `step_bundles` syntax needs.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The bundle installs the linter with `install.sh -b $(go env GOPATH)/bin` and
then calls `golangci-lint` by name. On this app's stack Go is managed by
asdf, GOPATH/bin is not on PATH, and the bundle fails:

    golangci-lint info installed /root/.asdf/installs/golang/1.21/packages/bin/golangci-lint
    + golangci-lint run --timeout 5m --color always --config ...
    line 13: golangci-lint: command not found
    exit status 127

Exporting the directory before the bundle runs is the smallest fix available
from this repo, since the bundle is included from steps-check and cannot be
adjusted locally. stepman and envman solve the same problem for their own
golangci-lint steps with `asdf reshim golang`.

The real fix belongs upstream — the bundle should invoke the binary at the
path it just installed it to, rather than relying on PATH — after which this
commit can be reverted on its own.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
`bundle::yamlfmt` runs yamlfmt in write mode and exits 0 whether or not it
changed anything. In steps-check's own `check` workflow that is paired with
`autofix-ci`, which commits the reformatted files back to the PR. Without
Unified CI there is no autofix, so the bundle reformats a workspace nobody
reads and throws the result away — the check could not fail, including on the
step.yml reformat an earlier commit here makes.

Call yamlfmt with `-lint` instead, so drift fails the build. The config is
still fetched from steps-check rather than copied into the repo, so there is
only one source of truth for the format.

The yamlfmt config module is no longer included, since nothing uses its
bundle now.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@gergely-sallai
gergely-sallai marked this pull request as ready for review October 8, 2026 15:27
Copilot AI balanced review requested due to automatic review settings October 8, 2026 15:27

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The migration is internally consistent, preserves existing tests, and the updated CI statuses pass.

0 open findings

What changed in this PR

Migrates failing legacy CI checks to maintained shared steps-check bundles while preserving integration tests.

Changes:

  • Adds YAML formatting, metadata audit, golangci-lint, and Go test checks.
  • Adds a GOPATH workaround and removes obsolete workflows.
  • Reformats step.yml without changing values.
File Description
bitrise.yml Modernizes CI configuration and removes dead workflows.
step.yml Applies shared YAML formatting.

🧠 Review effort: Balanced


Give feedback about Copilot approvals in this survey to enter a drawing for a $150 gift card.

@gergely-sallai
gergely-sallai added this pull request to stack #39 October 8, 2026 15:40
@gergely-sallai
gergely-sallai requested a review from a team October 9, 2026 13:40
@gergely-sallai
gergely-sallai merged commit 470e034 into master Oct 9, 2026
3 checks passed
@gergely-sallai
gergely-sallai deleted the fix-ci-migrate-to-steps-check-bundles branch October 9, 2026 15:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants