Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
80 changes: 61 additions & 19 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ jobs:
run: uv sync --locked --all-extras --dev
- name: Run Ruff Format Check
run: uv run ruff format --check

docs:
runs-on: ubuntu-latest
steps:
Expand Down Expand Up @@ -100,6 +100,65 @@ jobs:
run: uv sync --locked --all-extras --dev
- name: Run Unittests
run: uv run pytest --ignore tests/integration .

# Cargo / Rust stuff
cargo-fmt:
name: "cargo fmt"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: "Install Rust toolchain"
run: rustup component add rustfmt
- run: cargo fmt --all --check

cargo-clippy:
name: "cargo clippy"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: Swatinem/rust-cache@v2
with:
save-if: ${{ github.ref == 'refs/heads/main' }}
- name: "Install Rust toolchain"
run: rustup component add clippy
- name: "Clippy"
run: cargo clippy --workspace --all-targets --all-features --locked -- -D warnings

cargo-test-linux:
name: "cargo test (linux)"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: Swatinem/rust-cache@v2
with:
save-if: ${{ github.ref == 'refs/heads/main' }}
- name: "Install Rust toolchain"
run: rustup show
- name: "Run tests"
run: cargo test

# integration / self packaging tests
package_ourself:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.12"
- name: Install uv
uses: astral-sh/setup-uv@v6
with:
enable-cache: true
- uses: Swatinem/rust-cache@v2
with:
save-if: ${{ github.ref == 'refs/heads/main' }}
- name: Install the project
run: uv sync --locked --all-extras --dev
- name: Install debmagic (cli)
run: uv pip install packages/debmagic
- name: Run Debmagic build on ourself
run: uv run debmagic build --driver=docker

# TODO: integration tests currently don't work in the CI since they require running apt source on debian trixie -> CI runs on ubuntu
# integration-tests:
Expand All @@ -122,21 +181,4 @@ jobs:
# - name: Install the project
# run: uv sync --locked --all-extras --dev
# - name: Run Integrationtests
# run: uv run pytest tests/integration

package_ourself:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.12"
- name: Install uv
uses: astral-sh/setup-uv@v6
with:
enable-cache: true
- name: Install the project
run: uv sync --locked --all-extras --dev
- name: Run Debmagic build on ourself
run: uv run debmagic build --driver=docker
# run: uv run pytest tests/integration
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ venv*
MANIFEST
dist/
src/*/*.lock
# Rust
/target

# testing
/*.conf
Expand Down Expand Up @@ -51,5 +53,3 @@ Thumbs.db
# local
todo.md
todo.org


Loading