ci: move more commands used in CI into Just tasks #2981
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: Code Quality Checks | |
| on: | |
| pull_request: | |
| types: [opened, reopened, synchronize] | |
| merge_group: | |
| push: | |
| branches: | |
| - main | |
| - 'support/**' | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| env: | |
| CARGO_INCREMENTAL: 0 | |
| CARGO_NET_RETRY: 10 | |
| CI: 1 | |
| RUST_BACKTRACE: short | |
| RUSTFLAGS: "-D warnings" | |
| RUSTUP_MAX_RETRIES: 10 | |
| PIXI_VERSION: "v0.63.2" | |
| jobs: | |
| code-quality: | |
| name: Code Quality | |
| timeout-minutes: 15 | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 | |
| with: | |
| ref: ${{ github.event.pull_request.head.sha }} | |
| persist-credentials: false | |
| - name: Cache Dependencies | |
| uses: Swatinem/rust-cache@42dc69e1aa15d09112580998cf2ef0119e2e91ae # v2 | |
| with: | |
| # The rust cache includes a dep on the Python version (when building icechunk-python) | |
| # so we need to bump the version here whenever Python version is updated | |
| # Currently: 3.14 | |
| prefix-key: "rust-py314" | |
| shared-key: "rust" | |
| save-if: ${{ github.ref == 'refs/heads/main' }} | |
| - uses: prefix-dev/setup-pixi@a0af7a228712d6121d37aba47adf55c1332c9c2e # v0.9.4 | |
| with: | |
| pixi-version: ${{ env.PIXI_VERSION }} | |
| cache: true | |
| activate-environment: true | |
| manifest-path: icechunk-python/pyproject.toml | |
| - name: Prepare pixi for development | |
| run: | | |
| just profile=ci develop | |
| - name: Run formatting checks | |
| run: | | |
| just format --check | |
| - name: Run clippy linting | |
| run: | | |
| just profile=ci lint --workspace --all-targets | |
| - name: Run doc tests | |
| run: | | |
| just profile=ci doctest | |
| - name: Python mypy type checking | |
| run: | | |
| just mypy | |
| - name: Run pre-commit checks (skip Rust) | |
| run: | | |
| just py-pre-commit |