Sprint 40: CI + Coverage Completion — fixed 5 failing .forma tests, 2… #9
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: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| env: | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| test: | |
| name: Test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| - uses: Swatinem/rust-cache@v2 | |
| - name: Run tests | |
| run: cargo test --all | |
| clippy: | |
| name: Clippy | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: clippy | |
| - uses: Swatinem/rust-cache@v2 | |
| - name: Run clippy | |
| run: cargo clippy -- -D warnings | |
| fmt: | |
| name: Format | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: rustfmt | |
| - name: Check formatting | |
| run: cargo fmt --all -- --check | |
| llvm-check: | |
| name: LLVM Feature Check | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: clippy | |
| - uses: Swatinem/rust-cache@v2 | |
| - name: Install LLVM 18 and link dependencies | |
| run: | | |
| wget -qO- https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - | |
| echo "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-18 main" | sudo tee /etc/apt/sources.list.d/llvm-18.list | |
| sudo apt-get update | |
| sudo apt-get install -y llvm-18-dev libzstd-dev libpolly-18-dev | |
| - name: Clippy LLVM feature (zero warnings) | |
| run: cargo clippy --features llvm --all-targets -- -D warnings | |
| - name: Verify LLVM test targets compile | |
| run: cargo test --features llvm --no-run | |
| runtime-test: | |
| name: Runtime Crate Tests | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| - uses: Swatinem/rust-cache@v2 | |
| - name: Run runtime tests | |
| run: cd runtime && cargo test | |
| forma-tests: | |
| name: FORMA Integration Tests | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| - uses: Swatinem/rust-cache@v2 | |
| - name: Build | |
| run: cargo build --release | |
| - name: Run .forma test files | |
| run: | | |
| PASS=0 | |
| FAIL=0 | |
| SKIP=0 | |
| for f in tests/forma/*.forma; do | |
| name=$(basename "$f") | |
| case "$name" in | |
| test_tcp*|test_http_server*|test_database*|test_db_advanced*|test_prepared_statements*|test_process*|test_file_io*) | |
| echo "SKIP: $name (external deps)" | |
| SKIP=$((SKIP + 1)) | |
| continue | |
| ;; | |
| esac | |
| if ./target/release/forma run "$f" > /dev/null 2>&1; then | |
| echo "PASS: $name" | |
| PASS=$((PASS + 1)) | |
| else | |
| echo "FAIL: $name" | |
| FAIL=$((FAIL + 1)) | |
| fi | |
| done | |
| echo "" | |
| echo "Results: $PASS passed, $FAIL failed, $SKIP skipped" | |
| if [ "$FAIL" -gt 0 ]; then exit 1; fi | |
| showcase: | |
| name: Showcase Examples | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| - uses: Swatinem/rust-cache@v2 | |
| - name: Build | |
| run: cargo build --release | |
| - name: Run showcase examples | |
| run: | | |
| PASS=0 | |
| FAIL=0 | |
| for f in examples/showcase/*.forma; do | |
| name=$(basename "$f") | |
| if ./target/release/forma run "$f" > /dev/null 2>&1; then | |
| echo "PASS: $name" | |
| PASS=$((PASS + 1)) | |
| else | |
| echo "FAIL: $name" | |
| FAIL=$((FAIL + 1)) | |
| fi | |
| done | |
| echo "" | |
| echo "Results: $PASS passed, $FAIL failed" | |
| if [ "$FAIL" -gt 0 ]; then exit 1; fi |