Skip to content

pr

pr #85

Workflow file for this run

---
name: pr
on:
merge_group:
types: [checks_requested]
pull_request:
branches:
- trunk
workflow_dispatch:
env:
CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse
CARGO_NET_RETRY: 10
CARGO_HTTP_TIMEOUT: 60
CARGO_INCREMENTAL: 0
jobs:
changes:
name: Detect changes
runs-on: ubuntu-latest
outputs:
rust: ${{ steps.filter.outputs.rust }}
steps:
- uses: actions/checkout@v6
- uses: dorny/paths-filter@v3
id: filter
with:
filters: |
rust:
- '**/*.rs'
- '**/Cargo.toml'
- '**/Cargo.lock'
- 'rust-toolchain.toml'
- '.github/workflows/pr.yml'
check:
name: cargo check + test
runs-on: spiceai-macos
timeout-minutes: 60
needs: changes
if: needs.changes.outputs.rust == 'true'
steps:
- uses: actions/checkout@v6
- name: Setup Rust toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: 1.91
cache: false # Using GHA cache is slower than re-installing
- name: cargo check
run: make check
- name: cargo test
run: make test
clippy:
name: cargo clippy
runs-on: spiceai-macos
timeout-minutes: 60
needs: changes
if: needs.changes.outputs.rust == 'true'
steps:
- uses: actions/checkout@v6
- name: Setup Rust toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: 1.91
cache: false # Using GHA cache is slower than re-installing
- name: cargo clippy
run: make clippy