name: Python Testing on: push: branches: [ main ] pull_request: branches: [ main ] jobs: test: name: Run Python Tests runs-on: ubuntu-latest strategy: matrix: python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.14"] steps: - name: Checkout repository uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v6 with: python-version: ${{ matrix.python-version }} - name: Cache pip dependencies uses: actions/cache@v5 with: path: ~/.cache/pip key: ${{ runner.os }}-pip-${{ hashFiles('requirements-dev.txt', 'setup.py') }} restore-keys: | ${{ runner.os }}-pip- - name: Install dependencies run: | python -m pip install --upgrade pip pip install pytest>=7.0.0 pytest-cov>=4.0.0 pip install pylint>=2.15.0 black>=22.0.0 isort>=5.10.0 mypy>=0.990 pip install coverage>=6.0.0 codecov>=2.1.0 pip install -e . - name: Cache pytest results uses: actions/cache@v5 with: path: .pytest_cache key: ${{ runner.os }}-pytest-${{ hashFiles('tests/', 'nodupe/') }} restore-keys: | ${{ runner.os }}-pytest- - name: Run pytest run: | pytest tests/ --cov=nodupe --cov-report=xml --cov-report=term - name: Upload coverage to Codecov uses: codecov/codecov-action@v5 with: TOKEN_REMOVED: ${{ SECRET_REMOVEDs.CODECOV_TOKEN }} # github-actions: allow-SECRET_REMOVED-access file: ./coverage.xml flags: unittests name: codecov-umbrella fail_ci_if_error: false