diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml index 0a2e22f..eb12756 100644 --- a/.github/workflows/linting.yml +++ b/.github/workflows/linting.yml @@ -20,9 +20,12 @@ on: pull_request: branches: - master + schedule: + # Run weekly on Friday + - cron: '21 4 * * FRI' jobs: - build: + Lint: name: Python ${{ matrix.python }} runs-on: ubuntu-20.04 strategy: @@ -51,3 +54,24 @@ jobs: - name: Lint run: tox -e py + + Safety: + name: Safety check of dependencies + runs-on: ubuntu-20.04 + + steps: + - uses: actions/checkout@v2 + + - name: Install dependencies + run: | + sudo apt-get update + sudo apt-get install --assume-yes --no-install-recommends \ + default-libmysqlclient-dev \ + libmemcached-dev + pip install --upgrade pip setuptools + + - name: Install Tox + run: pip install tox + + - name: Safety Check + run: tox -e safety diff --git a/tox.ini b/tox.ini index ca4fdca..f688494 100644 --- a/tox.ini +++ b/tox.ini @@ -15,7 +15,7 @@ skip_missing_interpreters = true skipsdist = true envlist = - py37,py38,py39,py310 + safety,py37,py38,py39,py310 geany_modules = geany latest_version news nightlybuilds pastebin static_docs @@ -31,6 +31,13 @@ commands = {envbindir}/isort --check-only --diff {[tox]geany_modules} {envbindir}/pylint --rcfile=tox.ini --django-settings-module=geany.settings {[tox]geany_modules} +[testenv:safety] +deps = + safety + -r{toxinidir}/requirements.txt +commands = + {envbindir}/safety check + [flake8] exclude = build,.git,docs,migrations,local_settings.py,local_settings.docker.py ignore = E127,E128,