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: use sudo, assume docker present, use diff-{quality,cover} #314

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

AdamWill
Copy link
Contributor

Huh. I kinda just assumed we'd be root. Guess not!

All my attempts to just get a 'docker' binary installed seem to be failing on conflicts. Maybe it's already there in the GHA image? Let's try leaving it out.

Both linter tools report issues on the current master branch, which means they will always fail on exit. Using diff-quality gives us a check we can usefully fail on (as configured in this PR, it will only fail if the quality of the lines changed in the PR is less than 9.0).

Similarly we can use diff-cover to fail if coverage of the PR is under 90%.

This also uses a standard configuration file name for the pylint config (so we don't have to specify it with --rcfile), removes all non-default settings from the pylint config so it's clearer what we really intend to configure, and moves the flake8 config to a config file like pylint.

Huh. I kinda just assumed we'd be root. Guess not!

Docker is already in the GHA base image, no need to install.

Both linter tools report issues on the current master branch,
which means they will always fail on exit. Using diff-quality
gives us a check we can usefully fail on (as configured in this
PR, it will only fail if the quality of the lines changed in
the PR is less than 9.0).

Similarly we can generate a coverage report and use diff-cover
to fail if coverage of the PR is under 90%.

This also uses a standard configuration file name for the pylint
config (so we don't have to specify it with `--rcfile`), removes
all non-default settings from the pylint config so it's clearer
what we really intend to configure, and moves the flake8 config
to a config file like pylint.

We don't use pyproject.toml for configuration here because GHA's
Ubuntu environment is just not new enough, the tools in it don't
consistently read from pyproject.toml.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
@AdamWill AdamWill force-pushed the ci-fixes branch 2 times, most recently from efb103b to 927cc89 Compare January 29, 2024 21:44
@AdamWill
Copy link
Contributor Author

OK, this looks to be working. I can't manage to get it to give us diff-quality for the oz-* scripts, which is unfortunate, but it works for everything inside the oz module at least, which is an improvement.

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.

None yet

1 participant