refactor : upgrade and switch to uv #1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Tests | |
| on: | |
| push: | |
| branches: [ main, master, devel ] | |
| pull_request: | |
| branches: [ main, master, devel ] | |
| jobs: | |
| test: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, macos-latest] | |
| python-version: ['3.5', '3.6', '3.7', '3.8', '3.9', '3.10', '3.11'] | |
| exclude: | |
| # Python 3.5 is not available on ubuntu-latest (20.04+) | |
| - os: ubuntu-latest | |
| python-version: '3.5' | |
| include: | |
| # Add Python 3.5 on ubuntu-18.04 for compatibility | |
| - os: ubuntu-18.04 | |
| python-version: '3.5' | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install system dependencies (Ubuntu) | |
| if: runner.os == 'Linux' | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y git pandoc | |
| - name: Install system dependencies (macOS) | |
| if: runner.os == 'macOS' | |
| run: | | |
| brew update | |
| brew install pandoc | |
| - name: Install Python dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r requirements-test.txt | |
| - name: Run tests | |
| env: | |
| TRAVIS_GH3: 1 | |
| run: | | |
| var/bin/py.test --cov=git_repo --cov-report=term-missing tests/ | |
| - name: Upload coverage to Codecov | |
| if: matrix.python-version == '3.9' && matrix.os == 'ubuntu-latest' | |
| uses: codecov/codecov-action@v3 | |
| with: | |
| file: ./coverage.xml | |
| fail_ci_if_error: false |