-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d9f381d
commit b531f80
Showing
3 changed files
with
61 additions
and
0 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,40 @@ | ||
name: Style checker | ||
|
||
on: | ||
push: | ||
paths: | ||
- "**.py" | ||
- ".github/workflows/lint.yml" | ||
pull_request: | ||
branches: [main] | ||
paths: | ||
- "**.py" | ||
- ".github/workflows/lint.yml" | ||
workflow_dispatch: | ||
inputs: | ||
logLevel: | ||
description: "Log level" | ||
required: true | ||
default: "warning" | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
submodules: true | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install flake8 pytest colorama | ||
- name: Lint with flake8 | ||
run: | | ||
# stop the build if there are Python syntax errors or undefined names | ||
flake8 ./src/ninjar --count --select=E9,F63,F7,F82 --show-source --statistics | ||
# exit-zero treats all errors as warnings. | ||
flake8 ./src/ninjar --count --exit-zero --max-complexity=10 --max-line-length=120 --statistics |
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,20 @@ | ||
name: SSH | ||
on: [workflow_dispatch] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
submodules: true | ||
|
||
- name: Install build-script dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install --upgrade build | ||
pip install flake8 pytest | ||
- name: Start tmate session | ||
uses: mxschmitt/action-tmate@v3 |
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 |
---|---|---|
|
@@ -13,3 +13,4 @@ dist | |
!*.py | ||
!*.md | ||
!pyproject.toml | ||
!*.yml |