Compare commits
3 commits
6b929834b7
...
b390cd81c7
Author | SHA1 | Date | |
---|---|---|---|
b390cd81c7 | |||
b70b9a716a | |||
e0131a1bfa |
1 changed files with 54 additions and 30 deletions
|
@ -4,31 +4,31 @@ on: [push]
|
||||||
name: CI
|
name: CI
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
formatting:
|
# formatting:
|
||||||
name: Formatting
|
# name: Formatting
|
||||||
runs-on: ubuntu-22.04
|
# runs-on: ubuntu-22.04
|
||||||
steps:
|
# steps:
|
||||||
- name: Checkout
|
# - name: Checkout
|
||||||
uses: actions/checkout@v4
|
# uses: actions/checkout@v4
|
||||||
- name: Set up Rust
|
# - name: Set up Rust
|
||||||
uses: https://github.com/dtolnay/rust-toolchain@stable
|
# uses: https://github.com/dtolnay/rust-toolchain@stable
|
||||||
with:
|
# with:
|
||||||
components: rustfmt
|
# components: rustfmt
|
||||||
- name: Check Rust formatting
|
# - name: Check Rust formatting
|
||||||
run: cargo fmt --all -- --check
|
# run: cargo fmt --all -- --check
|
||||||
|
|
||||||
clippy:
|
# clippy:
|
||||||
name: Clippy
|
# name: Clippy
|
||||||
runs-on: ubuntu-22.04
|
# runs-on: ubuntu-22.04
|
||||||
steps:
|
# steps:
|
||||||
- name: Checkout
|
# - name: Checkout
|
||||||
uses: actions/checkout@v4
|
# uses: actions/checkout@v4
|
||||||
- name: Set up Rust
|
# - name: Set up Rust
|
||||||
uses: https://github.com/dtolnay/rust-toolchain@stable
|
# uses: https://github.com/dtolnay/rust-toolchain@stable
|
||||||
with:
|
# with:
|
||||||
components: clippy
|
# components: clippy
|
||||||
- name: Run Clippy
|
# - name: Run Clippy
|
||||||
run: "echo 'pretend i ran'" # cargo clippy -- -D warnings
|
# run: cargo clippy -- -D warnings
|
||||||
|
|
||||||
build:
|
build:
|
||||||
name: Build (and tests, for now)
|
name: Build (and tests, for now)
|
||||||
|
@ -42,7 +42,6 @@ jobs:
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v5
|
||||||
with:
|
with:
|
||||||
python-version: "3.13"
|
python-version: "3.13"
|
||||||
cache: pip
|
|
||||||
- name: Set up the Python environment
|
- 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
|
# For most Python CI stuff this isn't needed, but maturin specifically doesn't like to function without a venv
|
||||||
run: |
|
run: |
|
||||||
|
@ -52,19 +51,44 @@ jobs:
|
||||||
- name: Build Rust code
|
- name: Build Rust code
|
||||||
run: |
|
run: |
|
||||||
source venv/bin/activate
|
source venv/bin/activate
|
||||||
maturin develop
|
maturin build
|
||||||
|
- name: Save built wheel
|
||||||
|
uses: forgejo/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: pyority_queue.whl
|
||||||
|
path: target/wheels/*.whl
|
||||||
|
compression-level: 0
|
||||||
|
|
||||||
|
python-test:
|
||||||
|
name: Python tests
|
||||||
|
runs-on: ubuntu-22.04
|
||||||
|
steps:
|
||||||
|
- name: Checkout the code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
- name: Set up the Python toolchain
|
||||||
|
uses: actions/setup-python@v5
|
||||||
|
with:
|
||||||
|
python-version: "3.13"
|
||||||
|
- name: Set up the Python environment
|
||||||
|
run: pip install -r requirements.txt
|
||||||
|
- name: Retrieve built wheel
|
||||||
|
uses: forgejo/download-artifact@v4
|
||||||
|
- name: Install built wheel
|
||||||
|
run: pip install pyority_queue.whl
|
||||||
- name: Run Python tests
|
- name: Run Python tests
|
||||||
run: |
|
run: pytest tests/*.py
|
||||||
source venv/bin/activate
|
|
||||||
pytest tests/*.py
|
|
||||||
|
|
||||||
rust-test:
|
rust-test:
|
||||||
name: Rust test
|
name: Rust tests
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout the code
|
- name: Checkout the code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
- name: Set up Rust
|
- name: Set up Rust
|
||||||
uses: https://github.com/dtolnay/rust-toolchain@stable
|
uses: https://github.com/dtolnay/rust-toolchain@stable
|
||||||
|
- name: Set up the Python toolchain
|
||||||
|
uses: actions/setup-python@v5
|
||||||
|
with:
|
||||||
|
python-version: "3.13"
|
||||||
- name: Run Rust tests
|
- name: Run Rust tests
|
||||||
run: cargo test
|
run: cargo test
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue