name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main
permissions:
contents: read
concurrency:
group: ci-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
env:
CARGO_TERM_COLOR: always
jobs:
quality:
name: Rust quality
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
components: clippy,rustfmt
- name: Cache Cargo
uses: Swatinem/rust-cache@v2
- name: Check formatting
run: cargo fmt --all -- --check
- name: Run Clippy
run: cargo clippy --all-targets --all-features -- -D warnings
- name: Test default features
run: cargo test --all-targets
- name: Test minimal features
run: cargo test --all-targets --no-default-features
- name: Test SQLite only
run: cargo test --all-targets --no-default-features --features sqlite
- name: Test A3S Boot only
run: cargo test --all-targets --no-default-features --features boot
- name: Test SQLite and native TypeScript
run: cargo test --all-targets --no-default-features --features sqlite,native-ts
- name: Test A3S Boot with ORM storage
run: cargo test --all-targets --no-default-features --features boot,sqlite
- name: Test A3S Event integration
run: cargo test --all-targets --no-default-features --features a3s-event
- name: Build documentation
env:
RUSTDOCFLAGS: -D warnings
run: cargo doc --all-features --no-deps
- name: Verify package contents
env:
CARGO_TARGET_DIR: ${{ runner.temp }}/a3s-flow-package-target
run: cargo package --locked
api-compatibility:
name: Public API compatibility
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Check released API compatibility
uses: obi1kenobi/cargo-semver-checks-action@v2
with:
feature-group: all-features
native-ts-platform:
name: Native TypeScript (${{ matrix.name }})
strategy:
fail-fast: false
matrix:
include:
- name: Linux
os: ubuntu-24.04
compiler: target/debug/a3s-flow-native-compiler
- name: Windows
os: windows-latest
compiler: target/debug/a3s-flow-native-compiler.exe
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
- name: Install Bun
id: setup-bun
uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 with:
bun-version: 1.3.14
- name: Cache Cargo
uses: Swatinem/rust-cache@v2
with:
key: native-ts-${{ matrix.os }}
- name: Build the installable compiler
run: cargo build --bin a3s-flow-native-compiler
- name: Run the real Bun compiler and workflow smoke test
env:
A3S_FLOW_BUN: ${{ steps.setup-bun.outputs.bun-path }}
A3S_FLOW_NATIVE_TS_COMPILER: ${{ github.workspace }}/${{ matrix.compiler }}
run: >-
cargo test --test native_ts_bun_smoke --features native-ts --
--ignored --exact native_ts_compiler_executes_real_bun_workflow
postgres:
name: PostgreSQL 17
runs-on: ubuntu-24.04
services:
postgres:
image: postgres:17
env:
POSTGRES_DB: a3s_flow
POSTGRES_PASSWORD: a3s_flow
POSTGRES_USER: a3s_flow
options: >-
--health-cmd "pg_isready -U a3s_flow -d a3s_flow"
--health-interval 5s
--health-timeout 5s
--health-retries 12
ports:
- 5432:5432
env:
A3S_FLOW_POSTGRES_URL: postgres://a3s_flow:a3s_flow@127.0.0.1:5432/a3s_flow
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
- name: Cache Cargo
uses: Swatinem/rust-cache@v2
with:
key: postgres
- name: Run the all-feature real PostgreSQL suite
run: cargo test --all-targets --all-features -- --test-threads=1
- name: Run PostgreSQL durability examples
run: |
cargo run --quiet --features postgres --example postgres_durability
cargo run --quiet --features postgres --example postgres_task_queue_durability