power pages module #110
Workflow file for this run
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
name: PR validation | |
on: [pull_request] | |
jobs: | |
do-unit-tests: | |
name: Do unit tests | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
python-version: [3.8] | |
steps: | |
- name: Checkout main repo | |
uses: actions/checkout@v2 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
find . -name '*requirements.txt' | while read file; do pip install -r "$file"; done | |
- name: Test and check coverage pytest | |
run: | | |
export PYTHONPATH=$PYTHONPATH:./src: | |
pytest tests/ -n auto --cov --cov-fail-under=1 | |
do-flake8: | |
name: Do flake8 | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: [3.8] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
find . -name '*requirements.txt' | while read file; do pip install -r "$file"; done | |
- name: Lint with flake8 | |
run: | | |
flake8 src --count --show-source --statistics | |
do-mypy: | |
name: Do Mypy | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: [3.8] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
find . -name '*requirements.txt' | while read file; do pip install -r "$file"; done | |
- name: Lint with mypy | |
run: | | |
mypy ./src/powerpwn/nocodemalware/ | |
do-isort: | |
name: Do isort | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: [3.8] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
find . -name '*requirements.txt' | while read file; do pip install -r "$file"; done | |
- name: Run isort | |
run: | | |
isort --check --diff . | |
do-black: | |
name: Do black | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: [3.8] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
find . -name '*requirements.txt' | while read file; do pip install -r "$file"; done | |
- name: Run black | |
run: | | |
black --check --diff -C -l 150 . | |
do-security-check: | |
name: Do security check | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: [3.8] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
find . -name '*requirements.txt' | while read file; do pip install -r "$file"; done | |
- name: Run bandit | |
run: | | |
bandit -r . |