feat: support ngram token filter (#10) #6
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: Check | |
| on: | |
| pull_request: | |
| paths: | |
| - ".cargo" | |
| - ".github/workflows/check.yml" | |
| - "assets/**" | |
| - "src/**" | |
| - "tests/**" | |
| - "tools/**" | |
| - ".taplo.toml" | |
| - ".typos.toml" | |
| - "Cargo.lock" | |
| - "Cargo.toml" | |
| - "pg_tokenizer.control" | |
| push: | |
| paths: | |
| - ".cargo" | |
| - ".github/workflows/check.yml" | |
| - "assets/**" | |
| - "src/**" | |
| - "tests/**" | |
| - ".taplo.toml" | |
| - ".typos.toml" | |
| - "Cargo.lock" | |
| - "Cargo.toml" | |
| - "pg_tokenizer.control" | |
| merge_group: | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.ref }}-${{ github.workflow }} | |
| cancel-in-progress: true | |
| env: | |
| CARGO_TERM_COLOR: always | |
| RUST_BACKTRACE: 1 | |
| SCCACHE_GHA_ENABLED: true | |
| RUSTC_WRAPPER: sccache | |
| RUSTFLAGS: "-Dwarnings" | |
| jobs: | |
| style: | |
| runs-on: "ubuntu-latest" | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Typos | |
| uses: crate-ci/typos@master | |
| - name: Taplo | |
| run: | | |
| curl -fsSL https://github.com/tamasfe/taplo/releases/latest/download/taplo-full-linux-$(uname -m).gz | gzip -d - | install -m 755 /dev/stdin /usr/local/bin/taplo | |
| taplo fmt --check | |
| - name: Rustfmt | |
| run: cargo fmt --check | |
| lint: | |
| strategy: | |
| matrix: | |
| version: ["14", "15", "16", "17"] | |
| arch: ["x86_64", "aarch64"] | |
| runs-on: ${{ matrix.arch == 'x86_64' && 'ubuntu-24.04' || 'ubuntu-24.04-arm' }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up Environment | |
| run: ./tools/setup.sh ${{ matrix.version }} | |
| - name: Set up Sccache | |
| uses: mozilla-actions/[email protected] | |
| - name: Clippy | |
| run: cargo clippy --features pg${{ matrix.version }} | |
| - name: Unit Test | |
| run: cargo test --no-fail-fast --features pg${{ matrix.version }} | |
| - name: Install | |
| run: cargo pgrx install --features "pg${{ matrix.version }} lindera-ipadic" --release --sudo | |
| - name: Integration Test | |
| run: | | |
| sudo systemctl start postgresql | |
| psql -c 'CREATE EXTENSION IF NOT EXISTS pg_tokenizer CASCADE;' | |
| sqllogictest --db $USER --user $USER './tests/**/*.slt' |