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

Add CI for check/test/clippy/fmt #8

Merged
merged 5 commits into from
Jan 22, 2023
Merged

Add CI for check/test/clippy/fmt #8

merged 5 commits into from
Jan 22, 2023

Conversation

CMDJojo
Copy link
Member

@CMDJojo CMDJojo commented Jan 22, 2023

This PR attempts to use GitHub Actions as a CI for all pull requests and commits to main. To do this, two things have been done:

  1. One Cargo Workspace has been added containing all four crates as members (and a .gitignore was added)
  2. A RustCI.yml file was created under .github/workflows based on this comment from @axoxelol1 (some adjustments were made; names were added, toolchain installation was streamlined and more verbosity was added). But that gist was of good help!

The CI runs check, test , clippy and fmt.
I am unsure if this PR will actually check if the CI workflow works, but let's hope!

Resolves GH-3

@axoxelol1
Copy link
Collaborator

We are getting some warning annotations when the CI runs due to actions depending on node 12.

Code.js 12 actions are deprecated. Please update the following actions to use Node.js 16: actions/checkout@v2, actions-rs/toolchain@v1, actions-rs/cargo@v1. For more information see: https://github.blog/changelog/2022-09-22-github-actions-all-actions-will-begin-running-on-node16-instead-of-node12/.

Checkout could be updated to v3 to avoid this but I cannot find anything about updates to actions-rs. I didn't notice them when I made the gist. I think we could just ignore them for now and look at it again later.

@CMDJojo
Copy link
Member Author

CMDJojo commented Jan 22, 2023 via email

@CMDJojo
Copy link
Member Author

CMDJojo commented Jan 22, 2023

@axoxelol1 regarding your previous comment:

We are getting some warning annotations when the CI runs due to actions depending on node 12.

I have now updated checkout to use v3, and changed actions-rs/* to dtolnay/rust-toolchain and run. According to an issue on the actions-rs/cargo task we previously used, that repo isn't maintained anymore. Thank you for the heads-up, would have missed the warnings otherwise! I cannot see any more warnings on the new run with the new CI, and if you think it looks okay, I think we are ready for merging!

@CMDJojo
Copy link
Member Author

CMDJojo commented Jan 22, 2023

We could also just run all the tasks sequentially and then not having to set up the toolchain one time for each job, but I think that it isn't worth it since the toolchain setup only takes 1s and accounts for ≈3% of the total runtime for most jobs, and with that little CI time, it is more worth to get the jobs done quicker in my opinion, but please tell me if you disagree!

axoxelol1
axoxelol1 approved these changes Jan 22, 2023
@CMDJojo CMDJojo requested a review from axoxelol1 January 22, 2023 21:32
Copy link
Collaborator

@axoxelol1 axoxelol1 left a comment

Choose a reason for hiding this comment

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

lgtm

Copy link
Collaborator

@axoxelol1 axoxelol1 left a comment

Choose a reason for hiding this comment

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

lgtm

@CMDJojo CMDJojo merged commit 83ae0da into main Jan 22, 2023
@CMDJojo CMDJojo deleted the cmdjojo/GH-3/0 branch January 22, 2023 21:36
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.

Add code style checks
2 participants