Replace Pydantic with custom validation logic, restore v0.1.5 config and registry algorithm #246
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: | |
| concurrency: | |
| group: tests-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| lint: | |
| name: Lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.13" | |
| - run: pip install ruff pyright | |
| - run: ruff check confection | |
| - run: ruff format confection --check | |
| - run: pyright confection | |
| 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 | |
| run: | | |
| python -m pip install -U -r requirements.txt | |
| - name: Run tests | |
| run: | | |
| python -m pytest --pyargs confection |