Create CRUD triggers for raw tables #889
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
| on: | |
| push: | |
| pull_request: | |
| name: "tests" | |
| jobs: | |
| libs_linux: | |
| name: Building Linux libraries | |
| if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Build Linux libraries | |
| uses: ./.github/actions/linux | |
| libs_macos: | |
| name: Building macOS libraries | |
| if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository) | |
| runs-on: macos-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Build macOS | |
| uses: ./.github/actions/macos | |
| libs_windows: | |
| name: Building Windows libraries | |
| if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository) | |
| runs-on: windows-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Build Windows | |
| uses: ./.github/actions/windows | |
| libs_android: | |
| name: Building Android libraries | |
| if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Build Android | |
| uses: ./.github/actions/android | |
| with: | |
| sign-publication: '0' | |
| libs_wasm: | |
| name: Basic WASM build | |
| if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Build wasm | |
| uses: ./.github/actions/wasm | |
| libs_xcframework: | |
| name: Build XCFramework | |
| if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository) | |
| runs-on: macos-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Build XCFramework | |
| uses: ./.github/actions/xcframework | |
| rust_unit_tests: | |
| name: Rust unit tests on ${{ matrix.os }} | |
| if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository) | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-24.04, macos-latest] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Ubuntu setup | |
| if: matrix.os == 'ubuntu-24.04' | |
| run: | | |
| sudo apt install libreadline-dev | |
| - name: Install Rust Nightly | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| toolchain: nightly-2025-12-05 | |
| components: rust-src,rustfmt,clippy | |
| - name: Check formatting | |
| run: cargo fmt --all --check | |
| - name: Build | |
| run: | | |
| cargo build -p powersync_loadable --release | |
| cargo build -p powersync_core --release --features static | |
| cargo build -p powersync_sqlite --release | |
| cargo build -p sqlite3 --release | |
| - name: Test powersync | |
| run: | | |
| cargo test -p powersync_core | |
| - name: Check shell | |
| run: | | |
| ./target/release/powersync_sqlite ":memory:" "select powersync_rs_version()" | |
| - name: Check loadable extension | |
| run: | | |
| ./target/release/sqlite3 ":memory:" ".load ./target/release/libpowersync" "select powersync_rs_version()" | |
| build: | |
| name: Testing on ${{ matrix.os }} | |
| if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository) | |
| runs-on: ${{ matrix.os }} | |
| needs: [libs_linux, libs_macos, libs_windows] | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-24.04, ubuntu-arm64, macos-latest, windows-latest, windows-11-arm] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dart-lang/setup-dart@v1 | |
| - name: Setup Dart tests | |
| working-directory: dart | |
| run: | | |
| dart pub get | |
| dart analyze | |
| - uses: actions/cache@v4 | |
| with: | |
| path: dart/.dart_tool/hooks_runner/ | |
| key: hooks-${{ matrix.os }}-${{ hashFiles('dart/pubspec.lock') }} | |
| restore-keys: hooks-${{ matrix.os }} | |
| - name: Download libs | |
| uses: actions/download-artifact@v5 | |
| with: | |
| name: linux-library | |
| path: dart/assets | |
| - name: Download libs | |
| uses: actions/download-artifact@v5 | |
| with: | |
| name: macos-library | |
| path: dart/assets | |
| - name: Download libs | |
| uses: actions/download-artifact@v5 | |
| with: | |
| name: windows-library | |
| path: dart/assets | |
| - name: View downloaded artifacts | |
| if: runner.os == 'Linux' | |
| working-directory: dart | |
| run: | | |
| ls -al assets/ | |
| - name: Dart tests | |
| working-directory: dart | |
| run: | | |
| dart test -P ci | |
| build_stable_rust: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dart-lang/setup-dart@v1 | |
| - name: Install Rust Stable | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Setup Dart tests | |
| working-directory: dart | |
| run: | | |
| dart pub get | |
| dart analyze | |
| - uses: actions/cache@v4 | |
| with: | |
| path: dart/.dart_tool/hooks_runner/ | |
| key: hooks-${{ matrix.os }}-${{ hashFiles('dart/pubspec.lock') }} | |
| restore-keys: hooks-${{ matrix.os }} | |
| - name: Compile with stable Rust | |
| run: | | |
| cargo +stable build -p powersync_loadable | |
| - name: Dart tests with stable Rust | |
| working-directory: dart | |
| run: dart test | |
| valgrind: | |
| name: Testing with Valgrind on ${{ matrix.os }} | |
| runs-on: ${{ matrix.os }} | |
| if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository) | |
| strategy: | |
| matrix: | |
| include: | |
| - os: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Rust Nightly | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| toolchain: nightly-2025-12-05 | |
| components: rust-src | |
| - name: Install valgrind | |
| run: sudo apt update && sudo apt install -y valgrind | |
| - name: Install Cargo Valgrind | |
| # TODO: Use released version. Currently we rely on the git version while we wait for this | |
| # to be released: https://github.com/jfrimmel/cargo-valgrind/commit/408c0b4fb56e84eddc2bb09c88a11ba3adc0c188 | |
| run: cargo install --git https://github.com/jfrimmel/cargo-valgrind cargo-valgrind | |
| #run: cargo install cargo-valgrind | |
| - name: Test Core | |
| run: | | |
| cargo valgrind test -p powersync_core |