Skip to content

Add Windows and macOS test runs #130

Add Windows and macOS test runs

Add Windows and macOS test runs #130

Workflow file for this run

name: "Run tests"
on: [pull_request, workflow_call]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
env:
SDL_AUDIODRIVER: dummy
SDL_VIDEODRIVER: dummy
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.x
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt -r requirements-dev.txt
- name: Install project
run: pip install .
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names in the entire repo
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# stricter tests for mission critical code
flake8 --count src test
- name: Run tests
run: pytest
- uses: actions/upload-artifact@v4
if: ${{ failure() }}
with:
name: failed-image
path: test/failed-image