name: pytest
on:
  push:
    branches:
      - master
      - dev
jobs:
  test:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        python-version: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13']
    steps:
    - uses: actions/checkout@v4
    - name: setup python
      uses: actions/setup-python@v5
      with:
        python-version: ${{matrix.python-version}}
    - name: install
      run: |
        python -m pip install --upgrade pip
        pip install pytest pytest-cov beautifulsoup4
        pip install -e ./
    - name: run-tests
      run: |
        pytest --cov=src/pyluach tests/
    - name: Coveralls Parallel
      uses: coverallsapp/github-action@v2
      with:
        flag-name: ${{ matrix.python-version }}
        parallel: true
  finish:
    needs: test
    if: ${{ always() }}
    runs-on: ubuntu-latest
    steps:
    - name: Coveralls Finished
      uses: coverallsapp/github-action@v2
      with:
        parallel-finished: true
