-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Specify python3.11 in setup * Run all tests even if prior tests fail * Reorder pyupgrade after isort * Add log2ram to README * Add trailing-spaces check * find trailing spaces in Makefile * Always print filenames via H * Fix double space
- Loading branch information
Showing
5 changed files
with
72 additions
and
39 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 |
---|---|---|
|
@@ -85,6 +85,8 @@ jobs: | |
- added|modified: '**.tex' | ||
rst: | ||
- added|modified: '**.rst' | ||
any: | ||
- added|modified: '**' | ||
- name: Free Disk Space | ||
uses: jlumbroso/free-disk-space@main | ||
|
@@ -121,88 +123,91 @@ jobs: | |
|
||
# All files | ||
- name: detect-secrets | ||
if: success() || failure() | ||
run: poetry run detect-secrets-hook --exclude-lines 'integrity=' | ||
|
||
- name: blocklint | ||
if: success() || failure() | ||
run: poetry run blocklint --skip-files=poetry.lock --max-issue-threshold=1 | ||
|
||
# poetry | ||
- name: poetry | ||
if: steps.filter.outputs.poetry == 'true' | ||
if: (success() || failure()) && steps.filter.outputs.poetry == 'true' | ||
run: poetry check && poetry lock --no-update | ||
|
||
# python | ||
- name: isort | ||
if: steps.filter.outputs.python == 'true' | ||
if: (success() || failure()) && steps.filter.outputs.python == 'true' | ||
run: poetry run isort ${{ steps.filter.outputs.python_files }} | ||
|
||
- name: pyupgrade | ||
if: (success() || failure()) && steps.filter.outputs.python == 'true' | ||
run: poetry run pyupgrade ${{ steps.filter.outputs.python_files }} | ||
|
||
- name: black | ||
if: steps.filter.outputs.python == 'true' | ||
if: (success() || failure()) && steps.filter.outputs.python == 'true' | ||
run: poetry run black --check --diff ${{ steps.filter.outputs.python_files }} | ||
|
||
- name: flake8 | ||
if: steps.filter.outputs.python == 'true' | ||
if: (success() || failure()) && steps.filter.outputs.python == 'true' | ||
run: | | ||
echo "::group::version and plugins" | ||
poetry run flake8 --version | ||
echo "::endgroup::" | ||
poetry run flake8 ${{ steps.filter.outputs.python_files }} | ||
- name: mypy | ||
if: steps.filter.outputs.python == 'true' | ||
if: (success() || failure()) && steps.filter.outputs.python == 'true' | ||
run: poetry run mypy ${{ steps.filter.outputs.python_files }} | ||
|
||
- name: pylint | ||
if: steps.filter.outputs.python_alone == 'true' | ||
if: (success() || failure()) && steps.filter.outputs.python_alone == 'true' | ||
run: poetry run pylint ${{ steps.filter.outputs.python_alone_files }} | ||
|
||
- name: bandit | ||
if: steps.filter.outputs.python == 'true' | ||
if: (success() || failure()) && steps.filter.outputs.python == 'true' | ||
run: poetry run bandit -r ${{ steps.filter.outputs.python_files }} | ||
|
||
- name: vulture | ||
if: steps.filter.outputs.python == 'true' | ||
if: (success() || failure()) && steps.filter.outputs.python == 'true' | ||
run: poetry run vulture . # Needs to run on whole package | ||
|
||
- name: pyupgrade | ||
if: steps.filter.outputs.python == 'true' | ||
run: poetry run pyupgrade ${{ steps.filter.outputs.python_files }} | ||
|
||
- name: deptry | ||
if: steps.filter.outputs.python == 'true' | ||
if: (success() || failure()) && steps.filter.outputs.python == 'true' | ||
run: poetry run deptry . # Runs on whole package | ||
|
||
# javascript | ||
- name: standard | ||
if: steps.filter.outputs.javascript == 'true' | ||
if: (success() || failure()) && steps.filter.outputs.javascript == 'true' | ||
run: standard ${{ steps.filter.outputs.javascript_files }} | ||
|
||
# html | ||
- name: html5validator | ||
if: steps.filter.outputs.html == 'true' | ||
if: (success() || failure()) && steps.filter.outputs.html == 'true' | ||
uses: Cyb3r-Jak3/html5validator-action@master # blocklint: pragma | ||
with: | ||
config: .dev_config/.html5validator.yaml | ||
# only configurable to run on paths, so just run on whole package | ||
|
||
# prettier: html css scss json | ||
- name: prettier | ||
if: steps.filter.outputs.prettier == 'true' | ||
if: (success() || failure()) && steps.filter.outputs.prettier == 'true' | ||
id: prettier | ||
run: prettier --ignore-path .dev_config/.prettierignore --ignore-path .gitignore --config .dev_config/.prettierrc.yaml --check ${{ steps.filter.outputs.prettier_files }} # yamllint disable-line rule:line-length | ||
|
||
# yaml | ||
- name: yamllint | ||
if: steps.filter.outputs.yaml == 'true' | ||
if: (success() || failure()) && steps.filter.outputs.yaml == 'true' | ||
run: poetry run yamllint -c .dev_config/.yamllint.yaml --strict ${{ steps.filter.outputs.yaml_files }} # yamllint disable-line rule:line-length | ||
|
||
# makefile | ||
- name: checkmake | ||
if: steps.filter.outputs.makefile == 'true' | ||
if: (success() || failure()) && steps.filter.outputs.makefile == 'true' | ||
uses: Uno-Takashi/checkmake-action@main # Can not pass multiple files | ||
|
||
# shell files - no extension to filter on, always run | ||
- name: shellcheck shfmt checkbashisms | ||
if: success() || failure() | ||
uses: luizm/action-sh-checker@master # blocklint: pragma | ||
env: | ||
SHFMT_OPTS: -bn -ci -sr -s -d | ||
|
@@ -211,13 +216,14 @@ jobs: | |
|
||
# typos - always run | ||
- name: typos | ||
if: success() || failure() | ||
uses: crate-ci/[email protected] | ||
with: | ||
config: pyproject.toml | ||
|
||
# docs | ||
- name: markdownlint | ||
if: steps.filter.outputs.markdown == 'true' | ||
if: (success() || failure()) && steps.filter.outputs.markdown == 'true' | ||
uses: nosborn/[email protected] | ||
with: | ||
files: ${{ steps.filter.outputs.markdown_files }} | ||
|
@@ -226,5 +232,18 @@ jobs: | |
ignore_files: LICENSE.md | ||
|
||
- name: blacken-docs | ||
if: steps.filter.outputs.python == 'true' || steps.filter.outputs.markdown == 'true' || steps.filter.outputs.rst == 'true' || steps.filter.outputs.tex == 'true' # yamllint disable-line rule:line-length | ||
if: (success() || failure()) && (steps.filter.outputs.python == 'true' || steps.filter.outputs.markdown == 'true' || steps.filter.outputs.rst == 'true' || steps.filter.outputs.tex == 'true') # yamllint disable-line rule:line-length | ||
run: poetry run blacken-docs --line-length=100 ${{ steps.filter.outputs.python_files }} ${{ steps.filter.outputs.markdown_files }} ${{ steps.filter.outputs.rst_files }} ${{ steps.filter.outputs.tex_files }} # yamllint disable-line rule:line-length | ||
|
||
- name: trailing-spaces | ||
if: (success() || failure()) && steps.filter.outputs.any == 'true' | ||
run: | | ||
TRAILING_SPACES=$(grep -rInH ' $' ${{ steps.filter.outputs.any_files }} || true) | ||
if [[ $TRAILING_SPACES ]]; then | ||
echo "Trailing spaces found, please remove them:" | ||
echo "$TRAILING_SPACES" | ||
false | ||
else | ||
echo "No trailing spaces found." | ||
true | ||
fi |
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 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