feat(liquibase-xml): extract inline FK constraints and map Liquibase types #73
Workflow file for this run
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] | |
| schedule: | |
| # Weekly audit on Mondays at 06:00 UTC | |
| - cron: "0 6 * * 1" | |
| env: | |
| CARGO_TERM_COLOR: always | |
| # The ubuntu-latest runner has clang-18 + libclang pre-installed; | |
| # point bindgen at it so we can skip apt-get install libclang-dev. | |
| LIBCLANG_PATH: /usr/lib/llvm-18/lib | |
| jobs: | |
| check: | |
| name: Check (fmt, clippy, compile) | |
| runs-on: ubuntu-latest | |
| # Skip on scheduled runs (only audit needs the weekly trigger) | |
| if: github.event_name != 'schedule' | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Install Rust stable | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: clippy, rustfmt | |
| - name: Cache Cargo | |
| uses: Swatinem/rust-cache@v2 | |
| - name: Check formatting | |
| run: cargo fmt --check | |
| - name: Run Clippy | |
| run: cargo clippy --all-targets -- -D warnings | |
| - name: Check compilation | |
| run: cargo check | |
| test: | |
| name: Test | |
| runs-on: ubuntu-latest | |
| needs: check | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Install Rust stable | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Cache Cargo | |
| uses: Swatinem/rust-cache@v2 | |
| - name: Run tests | |
| run: cargo test | |
| build: | |
| name: Build (release) | |
| runs-on: ubuntu-latest | |
| needs: test | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Install Rust stable | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Cache Cargo | |
| uses: Swatinem/rust-cache@v2 | |
| - name: Build release binary | |
| run: cargo build --release | |
| - name: Upload release binary | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: pg-migration-lint | |
| path: target/release/pg-migration-lint | |
| if-no-files-found: error | |
| retention-days: 14 | |
| build-bridge: | |
| name: Build Liquibase bridge JAR | |
| runs-on: ubuntu-latest | |
| # Skip on scheduled runs (only audit needs the weekly trigger) | |
| if: github.event_name != 'schedule' | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Build fat JAR with Maven (via Docker) | |
| run: | | |
| docker run --rm \ | |
| -v "$PWD/bridge:/build" \ | |
| -w /build \ | |
| maven:3.9-eclipse-temurin-21 \ | |
| sh -c 'mvn package -q -DskipTests && cp target/liquibase-bridge-1.0.0.jar target/liquibase-bridge.jar' | |
| - name: Upload bridge JAR | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: liquibase-bridge | |
| path: bridge/target/liquibase-bridge.jar | |
| if-no-files-found: error | |
| retention-days: 14 | |
| deny: | |
| name: Deny (licenses, advisories, duplicates) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: EmbarkStudios/cargo-deny-action@v2 | |
| audit: | |
| name: Security audit | |
| runs-on: ubuntu-latest | |
| # Run on PRs, pushes to main, and the weekly schedule | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Install Rust stable | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Cache Cargo | |
| uses: Swatinem/rust-cache@v2 | |
| - name: Install cargo-audit | |
| run: cargo install cargo-audit --locked | |
| - name: Run audit | |
| run: cargo audit |