Skip to content

chore: Release 0.4.1 #140

chore: Release 0.4.1

chore: Release 0.4.1 #140

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1
jobs:
changes:
name: detect changes
runs-on: ubuntu-latest
outputs:
rust: ${{ steps.filter.outputs.rust == 'true' || steps.filter.outputs.ci == 'true' || github.ref == 'refs/heads/main' }}
python: ${{ steps.filter.outputs.python == 'true' || steps.filter.outputs.ci == 'true' || github.ref == 'refs/heads/main' }}
ui: ${{ steps.filter.outputs.ui == 'true' || steps.filter.outputs.ci == 'true' || github.ref == 'refs/heads/main' }}
steps:
- uses: actions/checkout@v4
- uses: dorny/paths-filter@v3
id: filter
with:
filters: |
rust:
- 'crates/**'
- 'apps/server/**'
- 'apps/inference/**'
- 'apps/cli/**'
- 'apps/sdk/**'
- 'Cargo.toml'
- 'Cargo.lock'
python:
- 'apps/sdk/**'
- 'crates/transforms/**'
ui:
- 'apps/ui/**'
ci:
- '.github/workflows/**'
- '.github/actions/**'
fmt:
name: cargo fmt
needs: changes
if: needs.changes.outputs.rust == 'true'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt
- name: main workspace
run: cargo fmt --check
- name: transforms workspace
working-directory: crates/transforms
run: cargo fmt --check
clippy:
name: cargo clippy
needs: changes
if: needs.changes.outputs.rust == 'true'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy
targets: wasm32-wasip2
- uses: Swatinem/rust-cache@v2
with:
shared-key: rust-stable-workspace
- name: main workspace
run: cargo clippy --workspace --all-targets -- -D warnings
- name: transforms workspace (wasm)
working-directory: crates/transforms
run: cargo clippy --target wasm32-wasip2 -- -D warnings
test-rust:
name: cargo test
needs: changes
if: needs.changes.outputs.rust == 'true'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
targets: wasm32-wasip2
- uses: Swatinem/rust-cache@v2
with:
shared-key: rust-stable-workspace
- uses: ./.github/actions/build-wasm-transform
- run: cargo test --workspace --no-fail-fast
msrv:
name: MSRV (1.88) - cli
needs: changes
if: needs.changes.outputs.rust == 'true'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@1.88
- uses: Swatinem/rust-cache@v2
- run: cargo check -p edgeflow-cli --locked
deny:
name: cargo deny
needs: changes
if: needs.changes.outputs.rust == 'true'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: EmbarkStudios/cargo-deny-action@v2
with:
command: check
arguments: --all-features
test-python:
name: python sdk tests (py${{ matrix.python }})
needs: changes
if: needs.changes.outputs.python == 'true'
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python: ["3.12", "3.13"]
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
targets: wasm32-wasip2
- uses: Swatinem/rust-cache@v2
- uses: astral-sh/setup-uv@v3
with:
enable-cache: true
- uses: ./.github/actions/build-wasm-transform
- name: maturin develop
working-directory: apps/sdk
run: |
uv venv -p ${{ matrix.python }}
uv run --with maturin maturin develop --features python
- name: pytest
working-directory: apps/sdk
run: uv run pytest
ui:
name: ui (check / test / build)
needs: changes
if: needs.changes.outputs.ui == 'true'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
cache-dependency-path: apps/ui/package-lock.json
- name: install
working-directory: apps/ui
run: npm ci
- name: svelte-check
working-directory: apps/ui
run: npm run check
- name: vitest
working-directory: apps/ui
run: npm test
- name: build
working-directory: apps/ui
run: npm run build
commitlint:
name: commitlint
runs-on: ubuntu-latest
if: github.event_name == 'pull_request'
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version: 20
- name: install commitlint
run: npm install --no-save @commitlint/cli @commitlint/config-conventional
- name: lint PR commits
run: |
npx commitlint \
--from ${{ github.event.pull_request.base.sha }} \
--to ${{ github.event.pull_request.head.sha }} \
--verbose