Skip to content

refactor: dataflow scheduler + stripped PipelineGraph API #38

refactor: dataflow scheduler + stripped PipelineGraph API

refactor: dataflow scheduler + stripped PipelineGraph API #38

Workflow file for this run

name: CI
on:
pull_request:
push:
branches: [main]
permissions:
contents: read
env:
CARGO_TERM_COLOR: always
jobs:
unit:
name: cargo test --lib + clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
# build.rs cross-compiles hm-plugin-* wasm artifacts.
targets: wasm32-wasip1
components: clippy
- uses: Swatinem/rust-cache@v2
- name: cargo build (all targets)
run: cargo build -p harmont-cli --all-targets
- name: cargo test --lib
run: cargo test -p harmont-cli --lib
- name: cargo clippy (strict)
run: cargo clippy --all-targets -p harmont-cli -- -D warnings
python-lint:
name: harmont-py (pytest + ruff + mypy)
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.11", "3.12"]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: pip
- name: Install harmont + dev extras
working-directory: dsls/harmont-py
run: pip install -e '.[dev]'
- name: ruff check
working-directory: dsls/harmont-py
run: ruff check .
- name: mypy
working-directory: dsls/harmont-py
run: mypy harmont
- name: pytest
working-directory: dsls/harmont-py
run: |
pytest -v \
--deselect tests/test_gradle.py \
--deselect tests/test_haskell.py
integration:
name: docker-gated integration test
runs-on: ubuntu-latest
# Skip the heavy job on draft PRs to save runner minutes. Push to
# main always runs it.
if: github.event_name == 'push' || (github.event_name == 'pull_request' && !github.event.pull_request.draft)
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
targets: wasm32-wasip1
- uses: Swatinem/rust-cache@v2
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install harmont-py (editable)
run: pip install -e dsls/harmont-py
- name: cargo build --tests (with docker-integration feature)
run: cargo build -p harmont-cli --tests --features docker-integration
- name: Pre-pull python:3.12-alpine
run: docker pull python:3.12-alpine
- name: cargo test --features docker-integration -- --ignored
env:
HARMONT_PYTHON: python3
run: |
cargo test -p harmont-cli \
--features docker-integration \
-- --ignored up_serves_http_and_tears_down --nocapture
- name: Show docker state on failure
if: failure()
run: |
docker ps -a
docker network ls
docker logs $(docker ps -aq) 2>&1 | head -200 || true