Add initial CI configuration with tox and GitHub Actions #1
Workflow file for this run
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: CI | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| workflow_dispatch: | |
| jobs: | |
| tests: | |
| name: tox | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: [ '3.9', '3.10', '3.11', '3.12', '3.13' ] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| cache: 'pip' | |
| - name: Install uv | |
| run: pip install uv | |
| - name: Install tox and plugins | |
| run: pip install tox tox-uv tox-gh-actions | |
| - name: Run tox | |
| env: | |
| PYTHONWARNINGS: default | |
| run: tox | |
| - name: Show coverage (if generated) | |
| if: always() | |
| run: | | |
| if [ -f .coverage ]; then | |
| pip install coverage && coverage report || true | |
| fi | |
| lint: | |
| name: lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up Python 3.12 | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.12' | |
| - name: Install uv | |
| run: pip install uv | |
| - name: Install package (editable) | |
| run: uv pip install -e . --no-deps | |
| - name: Basic import check | |
| run: python -c "import wagtail_orderable_viewset; print('Imported OK')" |