name: Run Python tests

on:
  push:
  pull_request:
  workflow_call:

jobs:
  build:
    name: Run tests
    runs-on: ubuntu-latest
    strategy:
      matrix:
        python-version: ["3.11", "3.13"]

    steps:
      - uses: MathRobin/timezone-action@v1.1
        with:
          timezoneLinux: "Europe/Brussels"
      - uses: actions/checkout@v4
      - name: Set up Python ${{ matrix.python-version }}
        uses: actions/setup-python@v5
        with:
          python-version: ${{ matrix.python-version }}
      - name: Install dependencies
        run: pip install pytest pytest-md pytest-emoji
      - name: Install requirements
        run: pip install -r requirements.txt && pip install -r requirements_tests.txt
      - uses: pavelzw/pytest-action@v2
        with:
          emoji: false
          verbose: false
          job-summary: true