Repository navigation
chore: add missing crate metadata #7
This file contains hidden or 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: Rust + Python CI | |
| on: | |
| push: | |
| branches: [ '*' ] | |
| pull_request: | |
| branches: [ main, master ] | |
| jobs: | |
| rust: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Rust toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: clippy, rustfmt | |
| - name: Check formatting | |
| run: cargo fmt --check || true | |
| - name: Build | |
| run: cargo build --verbose | |
| - name: Clippy | |
| run: cargo clippy -- -D warnings || true | |
| - name: Run tests | |
| run: cargo test --verbose || true | |
| python: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.10' | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install flake8 pytest | |
| if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | |
| if [ -f setup.py ]; then pip install -e .; fi | |
| if [ -f pyproject.toml ]; then pip install -e .; fi | |
| - name: Lint | |
| run: flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics || true | |
| - name: Test | |
| run: python -m pytest -x -v || true |