ci: add GitHub Actions for fmt, clippy, and test checks by LeeroyHannigan · Pull Request #44 · ExtendDB/extenddb · GitHub
Skip to content

ci: add GitHub Actions for fmt, clippy, and test checks#44

Merged
pdf-amzn merged 3 commits into
mainfrom
ci/github-actions
May 21, 2026
Merged

ci: add GitHub Actions for fmt, clippy, and test checks#44
pdf-amzn merged 3 commits into
mainfrom
ci/github-actions

Conversation

@LeeroyHannigan

Copy link
Copy Markdown
Collaborator

Three separate workflows so each appears as its own status check on PRs:

  • Format: cargo fmt --all -- --check
  • Clippy: cargo clippy --all-targets -- -D warnings
  • Test: cargo test --workspace

Uses rust-cache for faster CI runs on clippy and test.

Three separate workflows so each appears as its own status check on PRs:
- Format: cargo fmt --all -- --check
- Clippy: cargo clippy --all-targets -- -D warnings
- Test: cargo test --workspace

Uses rust-cache for faster CI runs on clippy and test.
@LeeroyHannigan

Copy link
Copy Markdown
Collaborator Author

with:
components: clippy
- uses: Swatinem/rust-cache@v2
- run: cargo clippy --all-targets -- -D warnings

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.

What is the effect of -D warnings? (Unsure of the semantics of deny vs forbid.)

@LeeroyHannigan LeeroyHannigan May 19, 2026

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

-D promotes warnings to errors. Still allows overrides.
-F would mean we cant use annotations to override clippy errors such as: #[allow(clippy::too_many_arguments)], as it would treat them as failures also.

@jcshepherd jcshepherd left a comment

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.

Looks good but would like to understand -D warnings on clippy: specifically, is it CI breaking or not?

name: Clippy
on:
pull_request:
push:

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.

Do these actions happen immediately before the push, or after?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

After. Runs when a PR get created/updated. And runs when we merge to main, but does not rollback if main has failed.

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.

So before and after? :-) (Before a PR is merged to main, and after.) Cool.

@jcshepherd jcshepherd left a comment

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.

Okay with me, but I'll let you do the merge once you and Paul are on the same page about CI.

Comment thread .github/workflows/fmt.yml
fmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

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.

Should this be @v6?

Comment thread .github/workflows/clippy.yml Outdated

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.

So this is interesting. I think our current main HEAD (2f65e1b) generates warnings (that block due to -D) in GitGub with this toolchain but does not generate warnings locally on my Linux box which has Rust 1.95.0 installed. Thoughts? Perhaps we want clippy and fmt to use Rust latest but test to use 1.85.0 (the oldest version we advertise support for)?

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.

huh. Never mind. The latest attempt to run the checks passed. So perhaps something was out of sync somewhere. Merging this before things get out of sync again.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Clippy was failing because it was missing something locally for me, that the LATEST version caught here. I thought it was better to fix those, and use LATEST as the action, rather than pinning a version that will shoot us in the foot later.

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'm assuming that this is pinning us to rust 1.85.0, yes?

@pdf-amzn pdf-amzn merged commit 85c65f3 into main May 21, 2026
6 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