-
Notifications
You must be signed in to change notification settings - Fork 145
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #261 from TheHive-Project/feature/add-basic-github…
…-actions Add basic ci workflow
- Loading branch information
Showing
6 changed files
with
50 additions
and
8 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,36 @@ | ||
name: CI | ||
on: [push] | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: ["3.8", "3.9", "3.10", "3.11"] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
run: | | ||
pip install --no-cache-dir -U pip .['dev'] | ||
- name: Lint check with flake8 | ||
run: | | ||
flake8 setup.py thehive4py/ tests/ | ||
- name: Format check with black | ||
run: | | ||
black --diff setup.py thehive4py/ tests/ | ||
- name: Type check with mypy | ||
run: | | ||
mypy --install-types --non-interactive thehive4py/ tests/ &> /dev/null | ||
mypy setup.py thehive4py/ tests/ | ||
# the pip-audit step will become much cleaner after migrating to pyproject.toml | ||
- name: CVE check with pip-audit | ||
run: | | ||
python -m venv auditvenv/ && auditvenv/bin/pip install --no-cache-dir -U pip . &> /dev/null | ||
auditvenv/bin/pip freeze > audit-requirements | ||
pip-audit -r audit-requirements | ||
- name: Security check with bandit | ||
run: | | ||
bandit -r setup.py thehive4py/ |
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
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