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: some minor fixes #675

Merged
merged 1 commit into from
Dec 7, 2022
Merged

Conversation

henryiii
Copy link
Collaborator

@henryiii henryiii commented Dec 5, 2022

Fixes to get CI working again, and some speed improvements.

Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
@henryiii henryiii marked this pull request as ready for review December 5, 2022 17:12
on: [push, pull_request]
on:
push:
branches: [main]
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Without this, CI is currently running twice on things like dependabot PRs.

env:
FORCE_COLOR: "1"
PRE_COMMIT_COLOR: "always"
Copy link
Collaborator Author

@henryiii henryiii Dec 5, 2022

Choose a reason for hiding this comment

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

I believe this was fixed in git / pre-commit.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Hmm, maybe not. Just a sec.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

No, I take that back.


concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Makes repeated pushes to the same PR faster. Generates a few "cancelled job" notifications, though.

jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
os: [ubuntu-20.04, windows-latest, macos-latest]
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Temporary until the coverage issue on 22.04 is resolved.

Comment on lines +32 to +33
miniforge-variant: Mambaforge
use-mamba: true
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

A lot faster & supports 3.11.

@henryiii
Copy link
Collaborator Author

henryiii commented Dec 5, 2022

The coverage issue:

nox/nox/virtualenv.py

Lines 373 to 394 in cc710bd

if original is None:
output = nox.command.run(
[self._resolved_interpreter, "-c", program], silent=True, log=False
)
assert isinstance(output, str)
original = output
created = nox.command.run(
["python", "-c", program], silent=True, log=False, paths=self.bin_paths
)
return original == created
def _read_base_prefix_from_pyvenv_cfg(self) -> str | None:
"""Return the base-prefix entry from pyvenv.cfg, if present."""
path = os.path.join(self.location, "pyvenv.cfg")
if os.path.isfile(path):
with open(path) as io:
for line in io:
key, _, value = line.partition("=")
if key.strip() == "base-prefix":
return value.strip()

I think this is never None on Ubuntu 22.04 & Python 3.11. Shouldn't the 100% requirement be on the combined coverage, rather than partial? Anyway, should this be marked as not being required to be covered, etc?

@FollowTheProcess
Copy link
Collaborator

FollowTheProcess commented Dec 6, 2022

Hmmm wonder why it would never be None on ubuntu-latest py3.11? Weird.

Agree on combined coverage being used for the fail-under, is this a config option in coverage? I did have a quick look but couldn't see anything obvious.

If we can't do that then yeah I agree we should exclude it from coverage measurement and revert back to ubuntu-latest

This all looks good to me 👍🏻

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants