feat: enable pg_query_parser feature for enhanced SQL parsing and ana… #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 | |
| RUSTFLAGS: -Dwarnings | |
| jobs: | |
| check: | |
| name: Check (${{ matrix.feature }}) | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| feature: [pg_query_parser, pg_parse_parser] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install system dependencies | |
| run: sudo apt-get update && sudo apt-get install -y libfontconfig1-dev | |
| - uses: dtolnay/rust-toolchain@stable | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| key: ${{ matrix.feature }} | |
| - run: cargo check --all-targets --no-default-features --features ${{ matrix.feature }} | |
| clippy: | |
| name: Clippy (${{ matrix.feature }}) | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| feature: [pg_query_parser, pg_parse_parser] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install system dependencies | |
| run: sudo apt-get update && sudo apt-get install -y libfontconfig1-dev | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: clippy | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| key: ${{ matrix.feature }} | |
| - run: cargo clippy --all-targets --no-default-features --features ${{ matrix.feature }} | |
| fmt: | |
| name: Format | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: rustfmt | |
| - run: cargo fmt --all -- --check | |
| svg-validate: | |
| name: Validate SVGs | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install xmllint | |
| run: sudo apt-get update && sudo apt-get install -y libxml2-utils | |
| - name: Validate SVG files | |
| run: | | |
| shopt -s nullglob | |
| svg_files=(*.svg **/*.svg) | |
| if [ ${#svg_files[@]} -eq 0 ]; then | |
| echo "No SVG files found" | |
| exit 0 | |
| fi | |
| echo "Validating ${#svg_files[@]} SVG file(s)..." | |
| for svg in "${svg_files[@]}"; do | |
| echo " Checking $svg" | |
| xmllint --noout "$svg" | |
| done | |
| echo "All SVG files are valid XML" | |
| test: | |
| name: Test (${{ matrix.feature }}) | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| feature: [pg_query_parser, pg_parse_parser] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install system dependencies | |
| run: sudo apt-get update && sudo apt-get install -y libfontconfig1-dev | |
| - uses: dtolnay/rust-toolchain@stable | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| key: ${{ matrix.feature }} | |
| - run: cargo test --all-targets --no-default-features --features ${{ matrix.feature }} | |
| bench-dry-run: | |
| name: Benchmark Dry Run (${{ matrix.feature }}) | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| feature: [pg_query_parser, pg_parse_parser] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install system dependencies | |
| run: sudo apt-get update && sudo apt-get install -y libfontconfig1-dev | |
| - uses: dtolnay/rust-toolchain@stable | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| key: ${{ matrix.feature }} | |
| - run: cargo bench --quiet --no-default-features --features ${{ matrix.feature }} -- --test |