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

Use 'cargo insta test' in Makefile's test command #777

Merged
merged 1 commit into from
Feb 26, 2024

Conversation

cnpryer
Copy link
Contributor

@cnpryer cnpryer commented Feb 26, 2024

I'm sure it's intentional to not run everything in CI. I felt it might be helpful especially for the CLI to fully run.

@@ -13,6 +13,10 @@ jobs:
with:
toolchain: stable
- uses: Swatinem/rust-cache@v2
- name: Install cargo insta
uses: taiki-e/install-action@v2
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@cnpryer cnpryer marked this pull request as ready for review February 26, 2024 04:29
@cnpryer cnpryer changed the title Use cargo insta in Makefile command Use cargo insta in CI Feb 26, 2024
@konstin
Copy link
Member

konstin commented Feb 26, 2024

Have you considered using nextest? For rye's small test suite the difference isn't big yet, but for uv it makes difference.

$ hyperfine --runs 5 "cargo nextest run" "cargo test"
Benchmark 1: cargo nextest run
  Time (mean ± σ):     11.164 s ±  0.091 s    [User: 7.781 s, System: 2.562 s]
  Range (min … max):   11.088 s … 11.313 s    5 runs
 
Benchmark 2: cargo test
  Time (mean ± σ):     17.686 s ±  0.532 s    [User: 7.825 s, System: 2.837 s]
  Range (min … max):   16.968 s … 18.447 s    5 runs
 
Summary
  cargo nextest run ran
    1.58 ± 0.05 times faster than cargo test

@cnpryer
Copy link
Contributor Author

cnpryer commented Feb 26, 2024

Have you considered using nextest? For rye's small test suite the difference isn't big yet, but for uv it makes difference.

I haven't used nextest yet personally, although I've known of it. I've been playing around a little bit with the uv tests just to look around, and I've liked nextest so far.

I'd be happy to check that out for this PR.

@mitsuhiko
Copy link
Collaborator

I would prefer that the CI invokes a makefile command. Other than that we can try this.

@cnpryer
Copy link
Contributor Author

cnpryer commented Feb 26, 2024

I would prefer that the CI invokes a makefile command. Other than that we can try this.

Okay, I'll revert back to what I had then. I'll push that real quick.

If you decide to merge before nextest I'll PR that separately soon. I don't anticipate getting to the nextest PR before wrapping up #759.

@cnpryer cnpryer changed the title Use cargo insta in CI Use 'cargo insta test' in Makefile's test command Feb 26, 2024
@mitsuhiko mitsuhiko merged commit ebedd58 into astral-sh:main Feb 26, 2024
6 checks passed
@cnpryer cnpryer deleted the cargo-insta branch February 26, 2024 20:56
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