Skip to content

updated pylint

updated pylint #1

Workflow file for this run

name: Tests
on:
push:
branches:
- kivy
pull_request:
jobs:
black:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install poetry
run: pipx install poetry
- uses: actions/setup-python@v5
with:
python-version: '3.12'
cache: 'poetry'
cache-dependency-path: './poetry.lock'
- name: Install poetry dependencies
run: poetry install
- name: Check format/
run: |
poetry run poe format-src --check --verbose
poetry run poe format-tests --check --verbose
poetry run poe format-e2e --check --verbose
poetry run poe format-installer --check --verbose
pylint:
needs: black
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Install poetry
run: pipx install poetry
- uses: actions/setup-python@v5
with:
python-version: '3.12'
cache: 'poetry'
cache-dependency-path: './poetry.lock'
- name: Install poetry dependencies
run: poetry install
- name: Lint src/
run: poetry run poe lint
# from xPsycHoWasPx in discord chat:
# "running macOS in none gpu accelerated mode, and that means no OpenGL,
# no OpenGL no kivy window…. if u need to use vm, you also need a dedicated
# seperate supported GPU passed through to the osx VM .."
#
# TODO: find how to install properly libs for M1/M2 Macs
# they raise exceptions that numpy and others libs
# arent compiled for arm64 (macos-14 and macos-xlarge-*)
pytest:
needs: pylint
strategy:
matrix:
os:
- ubuntu-latest
- windows-latest
- macos-12
- macos-13
version: ["3.10", "3.11", "3.12"]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Install poetry
run: pipx install poetry
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.version }}
cache: 'poetry'
cache-dependency-path: './poetry.lock'
- name: Install project and its dependencies
run: poetry install
- name: Run tests (Linux)
if: ${{ runner.os == 'Linux' }}
uses: coactions/setup-xvfb@90473c3ebc69533a1a6e0505c36511b69c8c3135
with:
run: |
poetry add pytest-xvfb
poetry run poe test
- name: Run tests (MacOS)
if: ${{ runner.os == 'macOS' }}
run: poetry run poe test-unit
- name: Run tests (Windows)
if: ${{ runner.os == 'Windows' }}
env:
KIVY_GL_BACKEND: 'angle_sdl2'
run: poetry run poe test
#- name: Run tests (MacOS)
# if: ${{ runner.os == 'macOS' }}
# env:
# KIVY_GL_DEBUG: 1
# KIVY_GL_BACKEND: 'gl'
# run: poetry run poe test
coverage:
needs: pytest
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Install poetry
run: pipx install poetry
- uses: actions/setup-python@v5
with:
python-version: '3.12'
cache: 'poetry'
cache-dependency-path: './poetry.lock'
- name: Install project and its dependencies
run: poetry install
- name: Build coverage file
uses: coactions/setup-xvfb@90473c3ebc69533a1a6e0505c36511b69c8c3135
with:
run: |
poetry add pytest-xvfb
poetry run poe coverage
- name: Upload coverage reports to Codecov with GitHub Action
uses: codecov/codecov-action@v4