pyority_queue/.forgejo/workflows/build.yaml
Michael Bradley 6b929834b7
Some checks failed
CI / Formatting (push) Successful in 35s
CI / Clippy (push) Successful in 38s
CI / Build (and tests, for now) (push) Successful in 1m30s
CI / Rust test (push) Failing after 58s
Split Rust test into separate job
2025-02-23 08:42:46 -05:00

70 lines
1.8 KiB
YAML

---
on: [push]
name: CI
jobs:
formatting:
name: Formatting
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Rust
uses: https://github.com/dtolnay/rust-toolchain@stable
with:
components: rustfmt
- name: Check Rust formatting
run: cargo fmt --all -- --check
clippy:
name: Clippy
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Rust
uses: https://github.com/dtolnay/rust-toolchain@stable
with:
components: clippy
- name: Run Clippy
run: "echo 'pretend i ran'" # cargo clippy -- -D warnings
build:
name: Build (and tests, for now)
runs-on: ubuntu-22.04
steps:
- name: Checkout the code
uses: actions/checkout@v4
- name: Set up Rust
uses: https://github.com/dtolnay/rust-toolchain@stable
- name: Set up the Python toolchain
uses: actions/setup-python@v5
with:
python-version: "3.13"
cache: pip
- name: Set up the Python environment
# For most Python CI stuff this isn't needed, but maturin specifically doesn't like to function without a venv
run: |
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
- name: Build Rust code
run: |
source venv/bin/activate
maturin develop
- name: Run Python tests
run: |
source venv/bin/activate
pytest tests/*.py
rust-test:
name: Rust test
runs-on: ubuntu-22.04
steps:
- name: Checkout the code
uses: actions/checkout@v4
- name: Set up Rust
uses: https://github.com/dtolnay/rust-toolchain@stable
- name: Run Rust tests
run: cargo test