build(deps-dev): bump jinja2 from 3.1.3 to 3.1.4 (#63) #114
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: Python Application Testing | |
on: [push] | |
jobs: | |
build-test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python 3.8.15 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.8.15" | |
- name: Install dependencies | |
run: | | |
sudo apt-get install poppler-utils | |
python -m pip install --upgrade pip | |
pip install poetry && poetry build | |
code-quality: | |
needs: build-test | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python 3.8.15 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.8.15" | |
- name: Install dependencies | |
run: | | |
sudo apt-get install poppler-utils | |
python -m pip install --upgrade pip | |
pip install poetry && poetry install | |
- name: Lint with flake8 | |
run: | | |
# stop the build if there are Python syntax errors or undefined names | |
poetry run flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics | |
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide | |
poetry run flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics | |
- name: Security Analysis with bandit | |
run: | | |
mkdir ci-logs | |
poetry run bandit -r -lll -f txt -o ci-logs/bandit.log ./pdf2dcm ./tests | |
- name: Archive bandit report | |
uses: actions/upload-artifact@v2 | |
with: | |
name: bandit-report | |
path: ci-logs/bandit.log | |
code-coverage: | |
needs: code-quality | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python 3.8.15 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.8.15" | |
- name: Install dependencies | |
run: | | |
sudo apt-get install poppler-utils | |
python -m pip install --upgrade pip | |
pip install poetry && poetry install | |
- name: Test with pytest | |
run: | | |
poetry install | |
poetry run pytest tests/ --cov-report=xml --cov=pdf2dcm --junitxml=./coverage.xml | |
- name: Code Coverage Summary Report | |
run: | | |
pip install coverage | |
coverage combine && coverage report --fail-under=90 -m | |
coverage html | |
- name: Archive code coverage html report | |
uses: actions/upload-artifact@v2 | |
with: | |
name: code-coverage-report | |
path: htmlcov/index.html |