-
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.
#7 - Updated GitHub action workflows
- Loading branch information
1 parent
8861e77
commit 1227225
Showing
4 changed files
with
107 additions
and
3 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,62 @@ | ||
name: run-tests | ||
on: [workflow_call] | ||
jobs: | ||
run-tests: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Setup Actions | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.11' | ||
|
||
- name: Install Python Dependencies | ||
run: | | ||
pip install --upgrade pip | ||
pip install flake8 | ||
flake8 --version | ||
pip install pylint | ||
pylint --version | ||
pip install mypy | ||
mypy --version | ||
pip install -r requirements.txt | ||
- name: Flake8 | ||
if: '!cancelled()' | ||
run: | | ||
PY_FILES=$(git ls-files '*.py') | ||
if [ -z "$PY_FILES" ] | ||
then | ||
echo "No files to check!" | ||
else | ||
flake8 $PY_FILES | ||
fi | ||
- name: Pylint | ||
if: '!cancelled()' | ||
run: | | ||
PY_FILES=$(git ls-files '*.py') | ||
if [ -z "$PY_FILES" ] | ||
then | ||
echo "No files to check!" | ||
else | ||
pylint $PY_FILES | ||
fi | ||
- name: MyPy | ||
if: '!cancelled()' | ||
run: | | ||
PY_FILES=$(git ls-files '*.py') | ||
if [ -z "$PY_FILES" ] | ||
then | ||
echo "No files to check!" | ||
else | ||
mypy --strict --explicit-package-bases --namespace-packages . | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
name: run-tests | ||
on: [workflow_call] | ||
jobs: | ||
run-tests: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Setup Actions | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.11' | ||
|
||
- name: Install Python Dependencies | ||
run: | | ||
pip install semgrep | ||
semgrep --version | ||
- name: Run Tests | ||
run: semgrep scan --error --config auto |
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,21 @@ | ||
name: run-secret-detection | ||
on: [workflow_call] | ||
jobs: | ||
run-tests: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Setup Actions | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.11' | ||
|
||
- name: Install Python Dependencies | ||
run: | | ||
pip install detect-secrets | ||
- name: Run Tests | ||
run: | | ||
git ls-files -z | xargs -0 detect-secrets-hook --baseline .secrets.baseline |
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