feat(config): add schema_evolution config scaffolding and v0.2 validation #490
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| pull_request: | |
| jobs: | |
| rustfmt: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: rustfmt | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| prefix-key: v0-rust | |
| add-job-id-key: false | |
| shared-key: v0-rust-feature | |
| - name: Check formatting | |
| run: cargo fmt --all -- --check | |
| clippy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: clippy | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| prefix-key: v0-rust | |
| add-job-id-key: false | |
| shared-key: v0-rust-feature | |
| - name: Lint with clippy | |
| run: cargo clippy --workspace --all-targets -- -D warnings | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dorny/paths-filter@v3 | |
| id: changes | |
| with: | |
| filters: | | |
| floe_core: | |
| - "crates/floe-core/**" | |
| core_code: | |
| - "crates/floe-core/src/**" | |
| - "crates/floe-core/Cargo.toml" | |
| core_code_global: | |
| - "crates/floe-core/src/**" | |
| - "!crates/floe-core/src/io/**" | |
| - "!crates/floe-core/src/report/**" | |
| - "!crates/floe-core/src/run/**" | |
| - "!crates/floe-core/src/manifest/**" | |
| - "!crates/floe-core/src/config/**" | |
| - "!crates/floe-core/src/checks/**" | |
| - "crates/floe-core/Cargo.toml" | |
| manifest: | |
| - "crates/floe-core/src/manifest/**" | |
| - "crates/floe-core/tests/unit/manifest/**" | |
| unit_tests: | |
| - "crates/floe-core/tests/unit/**" | |
| - "crates/floe-core/tests/unit.rs" | |
| integration_tests: | |
| - "crates/floe-core/tests/integration/**" | |
| - "crates/floe-core/tests/integration.rs" | |
| floe_cli: | |
| - "crates/floe-cli/**" | |
| core_io: | |
| - "crates/floe-core/src/io/**" | |
| - "crates/floe-core/tests/unit/io/**" | |
| core_run: | |
| - "crates/floe-core/src/run/**" | |
| - "crates/floe-core/tests/unit/run/**" | |
| io_format: | |
| - "crates/floe-core/src/io/format.rs" | |
| - "crates/floe-core/tests/unit/io/format.rs" | |
| io_read: | |
| - "crates/floe-core/src/io/read/**" | |
| - "crates/floe-core/tests/unit/io/read/**" | |
| io_storage: | |
| - "crates/floe-core/src/io/storage/**" | |
| - "crates/floe-core/tests/unit/io/storage/**" | |
| io_write: | |
| - "crates/floe-core/src/io/write/**" | |
| - "crates/floe-core/tests/unit/io/write/**" | |
| run_entity: | |
| - "crates/floe-core/src/run/entity/**" | |
| - "crates/floe-core/tests/unit/run/entity/**" | |
| run_checks: | |
| - "crates/floe-core/src/checks/**" | |
| - "crates/floe-core/tests/unit/run/checks.rs" | |
| run_schema: | |
| - "crates/floe-core/src/checks/mismatch.rs" | |
| - "crates/floe-core/src/run/schema_mismatch.rs" | |
| - "crates/floe-core/tests/unit/run/schema_mismatch.rs" | |
| run_report: | |
| - "crates/floe-core/src/report/**" | |
| - "crates/floe-core/tests/unit/report/**" | |
| - "crates/floe-core/tests/unit/run/report.rs" | |
| run_check_order: | |
| - "crates/floe-core/src/run/entity/**" | |
| - "crates/floe-core/src/run/file.rs" | |
| - "crates/floe-core/tests/unit/run/check_order.rs" | |
| run_normalize: | |
| - "crates/floe-core/src/run/normalize.rs" | |
| - "crates/floe-core/tests/unit/run/normalize.rs" | |
| core_config: | |
| - "crates/floe-core/src/config/**" | |
| - "crates/floe-core/tests/unit/config/**" | |
| docs: | |
| - "docs/**" | |
| - "README.md" | |
| - uses: dtolnay/rust-toolchain@stable | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| prefix-key: v0-rust | |
| add-job-id-key: false | |
| shared-key: v0-rust-feature | |
| - name: Run tests | |
| env: | |
| CARGO_BUILD_JOBS: "4" | |
| RUST_TEST_THREADS: "4" | |
| RUSTFLAGS: "-C debuginfo=0" | |
| run: | | |
| if [ "${{ steps.changes.outputs.floe_core }}" = "true" ]; then | |
| ran_unit=0 | |
| if [ "${{ steps.changes.outputs.core_config }}" = "true" ]; then | |
| cargo test -p floe-core --test unit config:: | |
| ran_unit=1 | |
| fi | |
| if [ "${{ steps.changes.outputs.manifest }}" = "true" ]; then | |
| cargo test -p floe-core --test unit manifest:: | |
| ran_unit=1 | |
| fi | |
| if [ "${{ steps.changes.outputs.io_format }}" = "true" ]; then | |
| cargo test -p floe-core --test unit io::format:: | |
| ran_unit=1 | |
| fi | |
| if [ "${{ steps.changes.outputs.io_read }}" = "true" ]; then | |
| cargo test -p floe-core --test unit io::read:: | |
| ran_unit=1 | |
| fi | |
| if [ "${{ steps.changes.outputs.io_storage }}" = "true" ]; then | |
| cargo test -p floe-core --test unit io::storage:: | |
| ran_unit=1 | |
| fi | |
| if [ "${{ steps.changes.outputs.io_write }}" = "true" ]; then | |
| cargo test -p floe-core --test unit io::write:: | |
| ran_unit=1 | |
| fi | |
| if [ "${{ steps.changes.outputs.run_entity }}" = "true" ]; then | |
| cargo test -p floe-core --test unit run::entity:: | |
| ran_unit=1 | |
| fi | |
| if [ "${{ steps.changes.outputs.run_checks }}" = "true" ]; then | |
| cargo test -p floe-core --test unit run::checks:: | |
| ran_unit=1 | |
| fi | |
| if [ "${{ steps.changes.outputs.run_schema }}" = "true" ]; then | |
| cargo test -p floe-core --test unit run::schema_mismatch:: | |
| ran_unit=1 | |
| fi | |
| if [ "${{ steps.changes.outputs.run_report }}" = "true" ]; then | |
| cargo test -p floe-core --test unit run::report:: | |
| ran_unit=1 | |
| fi | |
| if [ "${{ steps.changes.outputs.run_check_order }}" = "true" ]; then | |
| cargo test -p floe-core --test unit run::check_order:: | |
| ran_unit=1 | |
| fi | |
| if [ "${{ steps.changes.outputs.run_normalize }}" = "true" ]; then | |
| cargo test -p floe-core --test unit run::normalize:: | |
| ran_unit=1 | |
| fi | |
| if [ "$ran_unit" = "0" ] && [ "${{ steps.changes.outputs.core_code_global }}" = "true" ]; then | |
| cargo test -p floe-core --test unit | |
| ran_unit=1 | |
| fi | |
| if [ "$ran_unit" = "0" ] && [ "${{ steps.changes.outputs.unit_tests }}" = "true" ]; then | |
| cargo test -p floe-core --test unit | |
| fi | |
| if [ "${{ steps.changes.outputs.integration_tests }}" = "true" ] \ | |
| || [ "${{ steps.changes.outputs.core_code }}" = "true" ]; then | |
| cargo test -p floe-core --test integration | |
| fi | |
| cargo test -p floe-core --doc | |
| fi | |
| if [ "${{ steps.changes.outputs.floe_cli }}" = "true" ]; then | |
| cargo test -p floe-cli --tests | |
| fi |