Merge tox configs into pyproject.toml
#29
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: Run Tests | |
| on: | |
| push: | |
| pull_request: | |
| concurrency: | |
| # https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions#concurrency | |
| # https://docs.github.com/en/actions/reference/workflows-and-actions/contexts | |
| group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| test: | |
| name: Test ${{ matrix.os }}-${{ matrix.pyver }}-${{ matrix.arch }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [windows-latest] | |
| pyver: ['3.13', '3.12', '3.11', '3.10', '3.9', '3.8'] | |
| arch: [x64] | |
| include: | |
| - os: windows-latest | |
| pyver: '3.13' | |
| arch: x86 | |
| - os: ubuntu-latest | |
| pyver: '3.13' | |
| arch: x64 | |
| - os: macos-latest | |
| pyver: '3.13' | |
| arch: arm64 | |
| # other Python implementations | |
| - os: ubuntu-latest | |
| pyver: '3.13t' | |
| arch: x64 | |
| - os: ubuntu-latest | |
| pyver: 'pypy-3.11' | |
| arch: x64 | |
| # Many errors. Grossly incompatible. | |
| # - os: ubuntu-latest | |
| # pyver: 'graalpy-24.2.2' | |
| # arch: x64 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.pyver }} | |
| architecture: ${{ matrix.arch }} | |
| - name: Install package dependency (if needed) | |
| if: matrix.pyver == '3.13t' || matrix.pyver == 'graalpy-24.2.2' | |
| run: | | |
| sudo apt update | |
| sudo apt install -y libxml2-dev libxslt1-dev | |
| - name: Install package | |
| if: matrix.pyver != '3.13t' | |
| run: pip install .[adhoc_ssl] | |
| # A dependency of cryptography does not support free-threaded | |
| - name: Install package (free-threaded) | |
| if: matrix.pyver == '3.13t' | |
| run: pip install . | |
| - name: Run tests | |
| run: python -m unittest | |
| - name: Ensure all dependency can be installed | |
| if: matrix.pyver != '3.8' | |
| run: pip install --group dev | |
| - name: Ensure all dependency can be installed (py38) | |
| if: matrix.pyver == '3.8' | |
| run: | | |
| pip install dependency-groups | |
| dependency-groups dev -o requirements.txt | |
| pip install -r requirements.txt |