Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve CI #28

Merged
merged 3 commits into from
Jul 2, 2024
Merged

Improve CI #28

merged 3 commits into from
Jul 2, 2024

Conversation

marsavar
Copy link
Contributor

@marsavar marsavar commented Jul 2, 2024

What does this change?

Removes the toolchain installation step since Rust now is available on runner images.

Also splits CI into 4 jobs:

  • Test
  • Format (new)
  • Lint (new)
  • Check (new - this replaces the build step. Since we don't actually need to build an artifact, we can simply run cargo check which makes sure the code compiles without errors)

I've also fixed all the errors flagged by the linting tool.

How to test

I've made CI fail on purpose, it worked:

image

@marsavar marsavar marked this pull request as ready for review July 2, 2024 10:53
@marsavar marsavar changed the title Test linting works Improve CI Jul 2, 2024
Copy link
Member

@AshCorr AshCorr left a comment

Choose a reason for hiding this comment

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

👏 👏

Very nice!

with:
rust-version: 1.58
Copy link
Member

Choose a reason for hiding this comment

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

How does it know what version of rust to use without this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It will use what's available on the runner, which is currently Rust 1.79

It's fine if the runner bumps versions, Rust is backward compatible by design so it won't break. The toml file in this project also specifies the Rust edition (2021) so the compiler will respect that.

@marsavar marsavar merged commit c554c9d into main Jul 2, 2024
8 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.

2 participants