name: Ubuntu Latest CI - m-nodoubtz

on:
  push:
    branches: [ main ]
  pull_request:
    branches: [ main ]

jobs:
  build:
    runs-on: ubuntu-latest
    name: Build and Test on Ubuntu Latest (m-nodoubtz)
    steps:
      - name: Checkout code
        uses: actions/checkout@v4

      - name: Set up Python
        uses: actions/setup-python@v5
        with:
          python-version: '3.x'

      - name: Install dependencies
        run: |
          python -m pip install --upgrade pip
          pip install -r requirements.txt

      - name: Run tests
        run: |
          if [ -f pytest.ini ] || [ -f setup.cfg ] || [ -f tox.ini ]; then
            pytest
          else
            echo "No test config found, skipping tests."
          fi