chore: Use uv instead of Rye #182
This file contains 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: 'CI jobs' | |
on: | |
push: | |
branches: | |
- '**' | |
tags-ignore: | |
- '**' | |
pull_request: | |
workflow_dispatch: | |
jobs: | |
lint: | |
runs-on: 'ubuntu-latest' | |
steps: | |
- uses: 'actions/checkout@v4' | |
- uses: 'Swatinem/rust-cache@v2' | |
- name: 'Setup toolchain' | |
run: rustup toolchain install nightly --allow-downgrade -c rustfmt | |
- name: 'Run formatter' | |
run: cargo +nightly fmt --all --check | |
- name: 'Run linter' | |
run: cargo clippy --workspace --all-targets --all-features --locked -- -Dwarnings | |
test: | |
needs: ['lint'] | |
runs-on: 'ubuntu-latest' | |
steps: | |
- uses: 'actions/checkout@v4' | |
- uses: 'Swatinem/rust-cache@v2' | |
- name: 'Run test' | |
run: cargo test --verbose | |
e2e: | |
needs: ['lint'] | |
runs-on: 'ubuntu-latest' | |
steps: | |
- uses: 'actions/checkout@v4' | |
# Build target for pytest | |
- uses: 'Swatinem/rust-cache@v2' | |
- name: 'Build' | |
run: cargo build --verbose | |
# Run pytest | |
- uses: astral-sh/setup-uv@v3 | |
- name: Configure venv | |
run: | | |
uv sync --frozen --no-dev | |
- name: 'Run tests' | |
run: | | |
uv run pytest |