Add support for srsly 3.0 (unvendored) (#72) #230
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] | |
| pull_request: | |
| branches: ["*"] | |
| workflow_dispatch: # allows you to trigger manually | |
| # When this workflow is queued, automatically cancel any previous running | |
| # or pending jobs from the same branch | |
| concurrency: | |
| group: tests-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| validate: | |
| name: Validate | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out repo | |
| uses: actions/checkout@v6 | |
| - name: Configure Python version | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.13" | |
| - name: black | |
| run: | | |
| python -m pip install black -c requirements.txt | |
| python -m black confection --check | |
| - name: isort | |
| run: | | |
| python -m pip install isort -c requirements.txt | |
| python -m isort confection --check | |
| - name: flake8 | |
| run: | | |
| python -m pip install flake8 -c requirements.txt | |
| python -m flake8 confection --show-source --statistics | |
| tests: | |
| name: Test | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, windows-latest, macos-latest] | |
| python_version: ["3.10", "3.11", "3.12", "3.13", "3.14"] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - name: Check out repo | |
| uses: actions/checkout@v6 | |
| - name: Configure Python version | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ matrix.python_version }} | |
| - name: Build sdist | |
| run: | | |
| python -m pip install -U build pip setuptools | |
| python -m pip install -U -r requirements.txt | |
| python -m build --sdist | |
| - name: Delete source directory | |
| run: rm -rf confection | |
| shell: bash | |
| - name: Uninstall all packages | |
| run: | | |
| python -m pip freeze > installed.txt | |
| python -m pip uninstall -y -r installed.txt | |
| - name: Install from sdist | |
| run: | | |
| SDIST=$(python -c "import os;print(os.listdir('./dist')[-1])" 2>&1) | |
| python -m pip install dist/$SDIST | |
| shell: bash | |
| - name: Test import | |
| run: python -c "import confection" -Werror | |
| - name: Install test requirements with Pydantic v2 | |
| run: | | |
| python -m pip install -U -r requirements.txt | |
| python -m pip install -U pydantic | |
| - name: Run tests for Pydantic v2 | |
| run: | | |
| python -c "import pydantic; print(pydantic.VERSION)" | |
| python -m pytest --pyargs confection -Werror | |
| - name: Test for import conflicts with hypothesis | |
| run: | | |
| python -m pip install hypothesis | |
| python -c "import confection; import hypothesis" |