Handle Plex's custom collating tokenizer and collation #17
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: Build and Test | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y build-essential libsqlite3-dev libpq-dev pkg-config | |
| - name: Set up Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Build | |
| run: make | |
| - name: Run Rust Unit Tests | |
| run: cd sql_translator && cargo test | |
| - name: Upload binaries | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: binaries | |
| path: | | |
| sqlite_hook.so | |
| test_sqlite | |
| test_sqlite_wrapper.sh | |
| test-postgres: | |
| needs: build | |
| runs-on: ubuntu-24.04 | |
| strategy: | |
| matrix: | |
| postgres-version: [14, 15, 16, 17, 18] | |
| services: | |
| postgres: | |
| image: postgres:${{ matrix.postgres-version }} | |
| env: | |
| POSTGRES_DB: postgres | |
| POSTGRES_USER: postgres | |
| POSTGRES_PASSWORD: password | |
| ports: | |
| - 5432:5432 | |
| options: >- | |
| --health-cmd pg_isready | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install runtime dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y libsqlite3-dev libpq-dev postgresql-client | |
| - name: Download binaries | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: binaries | |
| - name: Wait for Postgres | |
| run: | | |
| until PGPASSWORD=password pg_isready -h 127.0.0.1 -U postgres; do | |
| echo "Waiting for Postgres..." | |
| sleep 2 | |
| done | |
| - name: Set permissions | |
| run: chmod +x test_sqlite test_sqlite_wrapper.sh | |
| - name: Run C Integration Test | |
| env: | |
| PG_CONNINFO: "host=127.0.0.1 user=postgres password=password dbname=postgres" | |
| PGPASSWORD: "password" | |
| run: | | |
| # Run and show output, but fail if connection message is missing | |
| ./test_sqlite_wrapper.sh |