Skip to content

Update bandit requirement from ~=1.7 to ~=1.8 #604

Update bandit requirement from ~=1.7 to ~=1.8

Update bandit requirement from ~=1.7 to ~=1.8 #604

Workflow file for this run

---
# Copyright (c) 2021-2024, Andrey "Limych" Khrolenok <[email protected]>
# Creative Commons BY-NC-SA 4.0 International Public License
# (see LICENSE.md or https://creativecommons.org/licenses/by-nc-sa/4.0/)
name: "Python testing"
on: [push, pull_request]
jobs:
ruff:
name: "Ruff"
runs-on: ubuntu-latest
steps:
- name: "Checkout the repository"
uses: actions/checkout@v4
- name: "Set up Python"
uses: actions/setup-python@v5
with:
python-version-file: 'pyproject.toml'
cache: "pip"
- name: "Cache pip"
uses: actions/cache@v4
with:
# This path is specific to Ubuntu
path: ~/.cache/pip
# Look to see if there is a cache hit for the corresponding requirements file
key: ${{ runner.os }}-pip-${{ hashFiles('requirements*.txt') }}
restore-keys: |
${{ runner.os }}-pip-
${{ runner.os }}-
- name: "Install dependencies"
run: |
python -m pip install --upgrade pip
# Prefer requirements-dev.txt
if [ -f requirements-dev.txt ]; then
pip install -r requirements-dev.txt
elif [ -f requirements-test.txt ]; then
pip install -r requirements-test.txt
elif [ -f requirements.txt ]; then
pip install -r requirements.txt
fi
pip install pytest-xdist
- name: "Lint"
run: python3 -m ruff check .
- name: "Format"
run: python3 -m ruff format . --check
tests:
name: "Test package"
needs: ruff
runs-on: ubuntu-latest
strategy:
max-parallel: 4
matrix:
python-version: ["3.10", "3.11", "3.12"]
steps:
- name: "Checkout code"
uses: actions/checkout@master
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: "Cache pip"
uses: actions/cache@v4
with:
# This path is specific to Ubuntu
path: ~/.cache/pip
# Look to see if there is a cache hit for the corresponding requirements file
key: ${{ runner.os }}-pip-${{ hashFiles('requirements*.txt') }}
restore-keys: |
${{ runner.os }}-pip-
${{ runner.os }}-
- name: "Install dependencies"
run: |
python -m pip install --upgrade pip
# Prefer requirements-test.txt
if [ -f requirements-test.txt ]; then
pip install -r requirements-test.txt
elif [ -f requirements-dev.txt ]; then
pip install -r requirements-dev.txt
elif [ -f requirements.txt ]; then
pip install -r requirements.txt
fi
pip install pytest-xdist
pip install -e .
- name: "Run tests with pytest"
run: |
pytest --basetemp=$RUNNER_TEMP --durations=10 -n auto --dist=loadfile -qq -o console_output_style=count -p no:sugar
./scripts/check_dirty