pyority_queue/.forgejo/workflows/build.yaml
Michael Bradley 53361619b9
Some checks failed
CI / Formatting (push) Successful in 39s
CI / Clippy (push) Failing after 51s
CI / Build (push) Failing after 7s
CI / Test Rust (push) Failing after 1m4s
Use apt to install Python modules for actions
2025-02-23 04:29:35 -05:00

65 lines
1.6 KiB
YAML

---
on: [push, pull_request]
name: CI
jobs:
formatting:
name: Formatting
runs-on: docker
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: docker
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: cargo clippy -- -D warnings
build:
name: Build
runs-on: docker
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python toolchain
uses: actions/setup-python@v5
with:
cache: pip
- name: Set up Python environment
run: |
apt-get install python3-pip python3-setuptools python3-wheel python3-venv
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
- name: Set up Rust
uses: https://github.com/dtolnay/rust-toolchain@stable
- name: Build Rust code
run: maturin develop
test-rust:
name: Test Rust
runs-on: docker
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Rust
uses: https://github.com/dtolnay/rust-toolchain@stable
- name: Set up Python toolchain
uses: actions/setup-python@v5
- name: Run Rust tests
run: cargo test