-
Notifications
You must be signed in to change notification settings - Fork 129
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CI: use sudo, assume docker present, use diff-{quality,cover}
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>
- Loading branch information
Showing
8 changed files
with
62 additions
and
241 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
[run] | ||
branch = true | ||
source_pkgs = | ||
oz | ||
|
||
[paths] | ||
# this mapping is for the containers; the source tree is in /oz in the containers | ||
source = | ||
oz/ | ||
/oz/oz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[flake8] | ||
max-line-length = 200 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
[MESSAGES CONTROL] | ||
disable=C0325,C0103 | ||
|
||
[REPORTS] | ||
reports=yes | ||
|
||
[TYPECHECK] | ||
|
||
[FORMAT] | ||
max-line-length=200 | ||
max-module-lines=2000 | ||
|
||
[VARIABLES] | ||
dummy-variables-rgx=.*_unused$ | ||
|
||
[BASIC] | ||
module-rgx=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9_]+))$ | ||
|
||
[DESIGN] | ||
max-args=20 | ||
max-locals=30 | ||
max-branches=30 | ||
max-statements=100 | ||
max-attributes=30 | ||
min-public-methods=0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.