Add a multi-Python setup with Tox #502
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: pull request | |
| on: | |
| pull_request: | |
| push: | |
| branches: [ main ] | |
| jobs: | |
| lint-format-types: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v6 | |
| with: | |
| enable-cache: true | |
| cache-dependency-glob: "uv.lock" | |
| - name: Set up Python 3.13 | |
| run: uv python install 3.13 | |
| - name: Install dependencies | |
| run: uv sync --extra dev | |
| - name: Format Check | |
| run: uv run ruff format --check | |
| - name: Lint | |
| run: uv run ruff check | |
| - name: Type Check (mypy) | |
| run: uv run mypy dune_client/ --strict | |
| tests: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v6 | |
| with: | |
| enable-cache: true | |
| cache-dependency-glob: "uv.lock" | |
| - name: Install Python versions | |
| run: uv python install 3.11 3.12 3.13 | |
| - name: Install dependencies | |
| run: uv sync --extra dev | |
| - name: Run tests with tox | |
| run: uv run tox | |
| - name: Run E2E tests (Python 3.13) | |
| env: | |
| DUNE_API_KEY: ${{ secrets.DUNE_API_KEY }} | |
| run: uv run --python 3.13 --extra dev python -m pytest tests/e2e -v |