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

ci-tests #9

Closed
wants to merge 16 commits into from
Closed

ci-tests #9

wants to merge 16 commits into from

Conversation

ozgunozerk
Copy link
Collaborator

This PR is providing a template for running the most important cargo commands in our CI-test.

We can use this CI as a condition in our PRs, so even if we forget to run cargo clippy for example, github won't :)

I've configured it, so that it will only run the test in ubuntu machines, but not on windows and macos. I thought running on all 3 major OS for each run would be an overkill.

If we want to run the test on macos and windows, I've added a dispatch option, we can manually dispatch this test on macos and windows.

@ozgunozerk ozgunozerk requested review from KitHat and 4meta5 November 15, 2023 10:58
@ozgunozerk ozgunozerk self-assigned this Nov 15, 2023
@ozgunozerk
Copy link
Collaborator Author

Good! Seems like it is working. I'll re-run the test once cargo fmt PR merges

Comment on lines +50 to +70
- name: cargo fmt
uses: actions-rs/cargo@ae10961054e4aa8b4aa7dffede299aaf087aa33b # @v1.0.1
with:
command: fmt
args: --all -- --check

- name: cargo test --locked
uses: actions-rs/cargo@ae10961054e4aa8b4aa7dffede299aaf087aa33b # @v1.0.1
with:
command: test

- name: cargo clippy --locked
uses: actions-rs/clippy-check@b5b5f21f4797c02da247df37026fcd0a5024aa4d # @v1.0.7
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --locked --all-targets -- -D warnings
Copy link
Contributor

Choose a reason for hiding this comment

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

where is cargo check/build --release?

Also eventually we will want to also test compilation with other feature flags i.e. --features = runtime-benchmarks, but that can be added later.

Copy link
Contributor

@4meta5 4meta5 Nov 15, 2023

Choose a reason for hiding this comment

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

cargo test compiles code in std so it is not sufficient to test release compilation

Copy link
Collaborator Author

@ozgunozerk ozgunozerk Nov 23, 2023

Choose a reason for hiding this comment

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

where is cargo check/build --release?

4meta5
4meta5 previously approved these changes Nov 22, 2023
@ozgunozerk
Copy link
Collaborator Author

I closed the PR, since I couldn't find a reliable way to progress on the issue. Might test on my own, did not want to spam you further with notifications

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