Skip to content

switch to ruff

switch to ruff #722

Workflow file for this run

name: Python package
on: [push]
jobs:
build:
strategy:
matrix:
os: [windows-latest]
python-version: [ "3.9", "3.10"]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Install Mesa
run: |
sudo apt-get install libglu1-mesa-dev
if: matrix.os == 'ubuntu-latest'
- name: Install python dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip freeze
- name: Ruff format
run: |
pip install ruff
ruff format --check .
- name: Lint with Ruff
run: |
pip install ruff
ruff .
- name: Mypy
run: |
pip install mypy
mypy .
- name: Install Deodr
run: |
python setup.py install
- name: Measure code complexity and maintainability
run: |
pip install radon
radon mi deodr
radon cc deodr
- name: Test with pytest
run: |
pip install pytest
pip install pytest-cov
cd tests
pytest
- name: Lint with flake8
run: |
pip install flake8 pep8-naming flake8-bugbear flake8-builtins flake8-docstrings flake8-import-order flake8-quotes
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics --radon-max-cc 16