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

Allow TMPDIR for tests #810

Merged
merged 1 commit into from
Nov 14, 2024
Merged

Allow TMPDIR for tests #810

merged 1 commit into from
Nov 14, 2024

Conversation

wolfgangwalther
Copy link
Contributor

On NixOS, /tmp is not writeable and TMPDIR is set. Use that instead.

Failure log without this patch: https://hydra.nixos.org/build/275642339/nixlog/1

@codecov-commenter
Copy link

codecov-commenter commented Nov 12, 2024

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.51%. Comparing base (8a80fba) to head (68526a3).
Report is 2 commits behind head on main.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #810   +/-   ##
=======================================
  Coverage   96.51%   96.51%           
=======================================
  Files          20       20           
  Lines         889      890    +1     
=======================================
+ Hits          858      859    +1     
  Misses         31       31           
Flag Coverage Δ
unittests 96.51% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@fizyk
Copy link
Member

fizyk commented Nov 13, 2024

@wolfgangwalther is there a way to include nixos in the CI on github-actions? And the other thing, could you add newsfragment?

@wolfgangwalther
Copy link
Contributor Author

is there a way to include nixos in the CI on github-actions?

That would be possible, sure, but I don't have the bandwidth to do that, sorry.

And the other thing, could you add newsfragment?

Not sure what I would write in a changelog about such a technical change in the tests. Nothing, probably.

@wolfgangwalther
Copy link
Contributor Author

And the other thing, could you add newsfragment?

Hm, I can't find any template or anything on how those newsfragments should look like. I have never used towncrier (?).

On NixOS, /tmp is not writeable and TMPDIR is set. Use that instead.
@wolfgangwalther
Copy link
Contributor Author

And the other thing, could you add newsfragment?

Hm, I can't find any template or anything on how those newsfragments should look like. I have never used towncrier (?).

Ah, found some in the git history. Like this?

@fizyk
Copy link
Member

fizyk commented Nov 14, 2024

And the other thing, could you add newsfragment?

Hm, I can't find any template or anything on how those newsfragments should look like. I have never used towncrier (?).

The chore in pr template shows the command to run to get a newsfragment :)

And yes, something like this.

And as for the test, no worries, hopefully I won't break anything in the future there ;)

Question though, why you need to run mirakuru's tests on NixOS? Outside of it's CI?

@wolfgangwalther
Copy link
Contributor Author

wolfgangwalther commented Nov 14, 2024

Question though, why you need to run mirakuru's tests on NixOS? Outside of it's CI?

In NixOS we try to always run all packages' tests when building them. I think most distributions do the same.

@fizyk fizyk merged commit 3e5018d into ClearcodeHQ:main Nov 14, 2024
21 checks passed
@fizyk
Copy link
Member

fizyk commented Nov 14, 2024

I'll have to remeber to switch to https://docs.pytest.org/en/stable/how-to/tmp_path.html in the future.

@fizyk
Copy link
Member

fizyk commented Feb 7, 2025

Switched to tmp_path_factory #846

@wolfgangwalther wolfgangwalther deleted the tmpdir branch February 7, 2025 20:49
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