Skip to content

feat(ci): various ci improvements#683

Merged
jlizen merged 7 commits into
tower-rs:mainfrom
jlizen:ci/improvements
May 23, 2026
Merged

feat(ci): various ci improvements#683
jlizen merged 7 commits into
tower-rs:mainfrom
jlizen:ci/improvements

Conversation

@jlizen
Copy link
Copy Markdown
Member

@jlizen jlizen commented May 22, 2026

Summary

The CI was missing several checks that are standard in the tower-rs ecosystem. Actions were also referenced by mutable tags, which is a supply-chain risk.

This adds three new CI jobs:

  • semver-checks: compares the public API against the last published crate on crates.io using cargo-semver-checks, with --all-features so feature-gated APIs are covered.
  • minimal-versions: resolves dependencies to their declared lower bounds and verifies they compile. Catches cases where a bump is needed but the Cargo.toml lower bound wasn't updated.
  • test-os: runs the full test suite on macOS and Windows. Relevant because the fs middleware deals with filesystem paths.

All GitHub Actions are now pinned by commit SHA with a version comment (e.g., actions/checkout@de0fac2... # v6.0.2). dtolnay/rust-toolchain is left unpinned since it uses branch refs by design. The taiki-e/install-action@cargo-hack branch ref was converted to the standard @v2 form with tool: cargo-hack input so it can be pinned consistently.

A new .github/dependabot.yml is configured for weekly GitHub Actions updates. Dependabot recognizes the SHA + version comment pattern and will propose PRs with updated SHAs automatically.

Also adds permissions: contents: read and concurrency (cancel-in-progress on PRs) to CI.yml, and a cache step to the check-docs job.

Comment thread .github/workflows/CI.yml Outdated
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I don't see benefits for pinning actions if all they can ever do is read from the repository, they cannot publish. The downsides are that we don't get fixes, or we have dependabot noise in the repo all the time. It feels like only downsides to me. (I also discussed this in hyperium/http#829, I just link for reference, not to continue the conversation there.)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

That's fair, I'll rip out the pinning.

@jlizen jlizen requested a review from seanmonstar May 22, 2026 12:39
@jlizen
Copy link
Copy Markdown
Member Author

jlizen commented May 22, 2026

CI is red due to semver checks as we have breaking things in-tree (which are already tagged as such in the pending changelog). The workflow intentionally continues on failure.

I think it would probably be more confusing to start staging the version bump ahead of time without the full release PR...

@jlizen jlizen force-pushed the ci/improvements branch from c9f0dd7 to 8bc464e Compare May 22, 2026 13:35
@jplatte
Copy link
Copy Markdown
Member

jplatte commented May 23, 2026

Re. semver-checks, I think we should compare against the base branch of each PR, rather than the released version.

Also, a comment would probably be nicer than failing CI. Here's two workflows that do that in another project I'm involved in (though in a repo with many crates, so there's some extra complexity there that we wouldn't need here):

I think it had to be split into two steps because some part of it wouldn't work on PRs from forks otherwise.

@jlizen
Copy link
Copy Markdown
Member Author

jlizen commented May 23, 2026

Ah, good suggestions @jplatte , appreciate it. I'll update the PR.

@jlizen jlizen merged commit 00b41ae into tower-rs:main May 23, 2026
16 checks passed
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