Skip to content

v0.0.20-beta

v0.0.20-beta #91

Workflow file for this run

name: Tests
on:
push:
branches:
- main
- develop
pull_request:
branches:
- main
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'
architecture: x64
- 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'
architecture: x64
- 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:
include:
- os: ubuntu-latest
arch: x64
- os: windows-latest
arch: x64
- os: macos-13
arch: x64
- os: macos-14
arch: arm64
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Install poetry
run: pipx install poetry
- uses: actions/setup-python@v5
if: ${{ matrix.arch != 'arm64' }}
with:
python-version: '3.12'
cache: 'poetry'
cache-dependency-path: './poetry.lock'
architecture: ${{ matrix.arch }}
- uses: actions/setup-python@v5
if: ${{ matrix.arch == 'arm64' }}
with:
python-version: '3.12'
- name: Install project and its dependencies
run: poetry install
- name: Run tests with coverage (Linux)
if: ${{ runner.os == 'Linux' }}
uses: coactions/setup-xvfb@6b00cf1889f4e1d5a48635647013c0508128ee1a
with:
run: |
poetry add pytest-xvfb
poetry run poe coverage
- name: Upload coverage reports to Codecov with GitHub Action
uses: codecov/codecov-action@v4
if: ${{ runner.os == 'Linux' }}
with:
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true
- 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