Skip to content

fix: requirements.txt to reduce vulnerabilities #1944

fix: requirements.txt to reduce vulnerabilities

fix: requirements.txt to reduce vulnerabilities #1944

Workflow file for this run

# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: storage.portale
on:
push:
branches: [ master, dev, crud, crud-cds-websites, v2 ]
pull_request:
branches: [ master, dev, crud, crud-cds-websites, v2 ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version:
- '3.9'
- '3.10'
- '3.11'
django-version:
- '3.2'
- '4.0'
- 'master'
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
if [ -f requirements.txt ]; then pip install -r requirements-dev.txt; fi
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
# python -m pip install --upgrade tox tox-gh-actions
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 ./ --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 ./ --count --exit-zero --statistics
- name: Test with Django tests
working-directory: .
run: |
coverage erase
coverage run ./manage.py test --settings=ricerca.settingslocal_test
coverage report -m
coverage report --fail-under=99
coverage xml
- name: Upload coverage to Codecov
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage.xml
flags: unittests
env_vars: OS,PYTHON
name: codecov-umbrella
fail_ci_if_error: true
path_to_write_report: ./codecov_report.txt
# verbose: true
- name: Bandit Security Scan
run: |
bandit -r -x tests.py ./*