-
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.
- Loading branch information
1 parent
aa8121d
commit df7c904
Showing
7 changed files
with
77 additions
and
49 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,18 @@ | ||
name: Run lint | ||
|
||
on: pull_request | ||
|
||
jobs: | ||
run_test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Install poetry | ||
run: pipx install poetry | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.10" | ||
cache: "poetry" | ||
- name: Install dependencies | ||
run: poetry install | ||
- run: bin/lint.sh |
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 |
---|---|---|
@@ -1,14 +1,16 @@ | ||
.bash_history | ||
.cache | ||
.coverage | ||
.env | ||
.idea/ | ||
.tox/ | ||
.mypy_cache/ | ||
*pyc | ||
.tox/ | ||
.venv | ||
*.egg-info | ||
Pipfile.lock | ||
*pyc | ||
auto_docs/steps/* | ||
build | ||
.venv | ||
reports/ | ||
.coverage | ||
htmlcov/ | ||
docs/_build | ||
.env | ||
htmlcov/ | ||
Pipfile.lock | ||
reports/ |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/bin/bash | ||
|
||
set -euo pipefail | ||
|
||
POETRY_RUN="poetry run" | ||
|
||
CURRENT_DIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd) | ||
BASE_DIR="$(dirname "$CURRENT_DIR")" | ||
HAS_GIT="$(command -v git || echo '')" | ||
echo $HAS_GIT | ||
|
||
$POETRY_RUN bandit -lll --recursive "${BASE_DIR}" --exclude "${BASE_DIR}/poetry.lock,${BASE_DIR}/.venv,${BASE_DIR}/.mypy,${BASE_DIR}/build" | ||
|
||
if [ -n "$HAS_GIT" ]; then | ||
# Scan only files checked into the repo, omit poetry.lock | ||
SECRETS_TO_SCAN=`git ls-tree --full-tree -r --name-only HEAD | grep -v poetry.lock` | ||
$POETRY_RUN detect-secrets-hook $SECRETS_TO_SCAN --baseline .secrets.baseline | ||
fi | ||
|
||
$POETRY_RUN isort --check-only "${BASE_DIR}" | ||
$POETRY_RUN black --check "${BASE_DIR}" | ||
$POETRY_RUN mypy "${BASE_DIR}/ctms" | ||
$POETRY_RUN pylint "${BASE_DIR}/ctms" "${BASE_DIR}/tests/unit" |
This file was deleted.
Oops, something went wrong.