Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 49 additions & 0 deletions .github/workflows/run-rust-tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: run-rust-tests

on:
pull_request:

jobs:
run-rust-tests:
runs-on: ubuntu-latest
steps:
- name: Log workflow inputs
run: echo "${{ toJson(github.event.inputs) }}"
- name: Checkout repo
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Install rust
shell: bash
run: |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
CARGO_BIN="$HOME/.cargo/bin"
echo 'export PATH="$CARGO_BIN:$PATH"' >> $HOME/.bashrc
echo "$CARGO_BIN" >> $GITHUB_PATH
- name: Install uv
shell: bash
run: |
curl -LsSf https://astral.sh/uv/install.sh | sh
UV_BIN="$HOME/.local/bin"
echo 'export PATH="$UV_BIN:$PATH"' >> $HOME/.bashrc
echo "$UV_BIN" >> $GITHUB_PATH
- name: Install (and pin) python version
shell: bash
run: |
uv python install 3.12
uv python pin 3.12
- name: Setup uv environment
run: |
uv v
source .venv/bin/activate
uv pip install ray[default] maturin
- name: Restore cache
uses: actions/cache@v4
with:
path: target/release
key: ${{ runner.os }}-cargo-deps-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ runner.os }}-cargo-deps-
- name: Run tests
run: |
source .venv/bin/activate
cargo test --release
Loading