diff options
Diffstat (limited to '.github/workflows/tests.yml')
-rw-r--r-- | .github/workflows/tests.yml | 31 |
1 files changed, 28 insertions, 3 deletions
diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 341859e..077a9c7 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -13,13 +13,27 @@ on: - '**' jobs: + Linting: + name: Linting + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-python@v4 + with: + python-version: "3.11" + - name: "Install pre-commit" + run: pip install pre-commit + - name: "Install Rust toolchain" + run: rustup component add rustfmt clippy + - run: pre-commit run --all-files + Tests: name: ${{ matrix.os }} / ${{ matrix.python-version }} runs-on: ${{ matrix.os }}-latest strategy: matrix: os: [Ubuntu, MacOS, Windows] - python-version: [3.7, 3.8, 3.9, "3.10"] + python-version: [3.8, 3.9, "3.10", "3.11", "3.12"] defaults: run: shell: bash @@ -31,6 +45,7 @@ jobs: uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} + allow-prereleases: true - name: Get full Python version id: full-python-version @@ -64,8 +79,18 @@ jobs: if: steps.cache.outputs.cache-hit == 'true' && matrix.os != 'MacOS' run: timeout 10s poetry run pip --version || rm -rf .venv - - name: Install dependencies - run: poetry install --only main --only test -vvv + - name: Install runtime, testing, and typing dependencies + run: poetry install --only main --only test --only typing --only build --no-root -vvv + + - name: Install project + run: poetry run maturin develop + + - name: Run type checking + run: poetry run mypy + + - name: Uninstall typing dependencies + # This ensures pendulum runs without typing_extensions installed + run: poetry install --only main --only test --only build --sync --no-root -vvv - name: Test Pure Python run: | |