CI Linting #136
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
# LICENCE: This program is free software: you can redistribute it and/or modify | |
# it under the terms of the GNU Affero General Public License as published by | |
# the Free Software Foundation, either version 3 of the License, or | |
# (at your option) any later version. | |
# | |
# This program is distributed in the hope that it will be useful, | |
# but WITHOUT ANY WARRANTY; without even the implied warranty of | |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
# GNU Affero General Public License for more details. | |
# | |
# You should have received a copy of the GNU Affero General Public License | |
# along with this program. If not, see <http://www.gnu.org/licenses/>. | |
name: CI Linting | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
schedule: | |
# Run weekly on Friday | |
- cron: '21 4 * * FRI' | |
jobs: | |
Lint: | |
name: Python ${{ matrix.python }} | |
runs-on: ubuntu-22.04 | |
strategy: | |
matrix: | |
python: ['3.7', '3.8', '3.9', '3.10'] | |
fail-fast: false | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python }} | |
- 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: Lint | |
run: tox -e py | |
Safety: | |
name: Safety check of dependencies | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- 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 |