Enhance logging for parameter query results in BucketChecksumS #2896
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: Build and Test | |
| on: | |
| workflow_dispatch: | |
| pull_request: | |
| push: | |
| branches: | |
| - '**' | |
| tags-ignore: | |
| - '**' | |
| jobs: | |
| test-service-container-build: | |
| name: Build and Test PowerSync Service | |
| 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: | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| - name: Login to Docker Hub | |
| if: github.event_name != 'pull_request' | |
| uses: docker/login-action@v3 | |
| with: | |
| username: ${{ secrets.DOCKERHUB_USERNAME }} | |
| password: ${{ secrets.DOCKERHUB_TOKEN }} | |
| - name: Set up QEMU | |
| uses: docker/setup-qemu-action@v3 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Test Build Docker Image | |
| uses: docker/build-push-action@v5 | |
| with: | |
| cache-from: type=registry,ref=stevenontong/${{vars.DOCKER_REGISTRY}}:cache | |
| context: . | |
| platforms: linux/amd64 | |
| push: false | |
| file: ./service/Dockerfile | |
| run-core-tests: | |
| name: Core Test | |
| 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@v5 | |
| - name: Login to Docker Hub | |
| if: github.event_name != 'pull_request' | |
| uses: docker/login-action@v3 | |
| with: | |
| username: ${{ secrets.DOCKERHUB_USERNAME }} | |
| password: ${{ secrets.DOCKERHUB_TOKEN }} | |
| # The mongodb-github-action below doesn't use the Docker credentials for the pull. | |
| # We pre-pull, so that the image is cached. | |
| - name: Pre-pull Mongo image | |
| run: docker pull mongo:8.0 | |
| - name: Start MongoDB | |
| uses: supercharge/[email protected] | |
| with: | |
| mongodb-version: '8.0' | |
| mongodb-replica-set: test-rs | |
| - name: Enable Corepack | |
| run: corepack enable | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version-file: '.nvmrc' | |
| cache: pnpm | |
| - name: Install dependencies | |
| run: pnpm install | |
| - name: Build | |
| shell: bash | |
| run: pnpm build | |
| - name: Test | |
| run: pnpm --filter '!./modules/*' test | |
| run-postgres-tests: | |
| name: Postgres Test | |
| runs-on: ubuntu-latest | |
| needs: run-core-tests | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| postgres-version: [11, 12, 13, 14, 15, 16, 17, 18] | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Login to Docker Hub | |
| if: github.event_name != 'pull_request' | |
| uses: docker/login-action@v3 | |
| with: | |
| username: ${{ secrets.DOCKERHUB_USERNAME }} | |
| password: ${{ secrets.DOCKERHUB_TOKEN }} | |
| - name: Start PostgreSQL | |
| run: | | |
| docker run \ | |
| --health-cmd pg_isready \ | |
| --health-interval 10s \ | |
| --health-timeout 5s \ | |
| --health-retries 5 \ | |
| -e POSTGRES_PASSWORD=postgres \ | |
| -e POSTGRES_DB=powersync_test \ | |
| -p 5432:5432 \ | |
| -d postgres:${{ matrix.postgres-version }} \ | |
| -c wal_level=logical | |
| - name: Start PostgreSQL (Storage) | |
| run: | | |
| docker run \ | |
| --health-cmd pg_isready \ | |
| --health-interval 10s \ | |
| --health-timeout 5s \ | |
| --health-retries 5 \ | |
| -e POSTGRES_PASSWORD=postgres \ | |
| -e POSTGRES_DB=powersync_storage_test \ | |
| -p 5431:5432 \ | |
| -d postgres:${{ matrix.postgres-version }} | |
| # The mongodb-github-action below doesn't use the Docker credentials for the pull. | |
| # We pre-pull, so that the image is cached. | |
| - name: Pre-pull Mongo image | |
| run: docker pull mongo:8.0 | |
| - name: Start MongoDB | |
| uses: supercharge/[email protected] | |
| with: | |
| mongodb-version: '8.0' | |
| mongodb-replica-set: test-rs | |
| - name: Enable Corepack | |
| run: corepack enable | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version-file: '.nvmrc' | |
| cache: pnpm | |
| - name: Install dependencies | |
| run: pnpm install | |
| - name: Build | |
| shell: bash | |
| run: pnpm build | |
| - name: Test Replication | |
| run: pnpm --filter='./modules/module-postgres' test | |
| - name: Test Storage | |
| run: pnpm --filter='./modules/module-postgres-storage' test | |
| run-mysql-tests: | |
| name: MySQL Test | |
| runs-on: ubuntu-latest | |
| needs: run-core-tests | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| mysql-version: [5.7, 8.0, 8.4] | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Login to Docker Hub | |
| if: github.event_name != 'pull_request' | |
| uses: docker/login-action@v3 | |
| with: | |
| username: ${{ secrets.DOCKERHUB_USERNAME }} | |
| password: ${{ secrets.DOCKERHUB_TOKEN }} | |
| - name: Start MySQL | |
| run: | | |
| docker run \ | |
| --name MySQLTestDatabase \ | |
| -e MYSQL_ROOT_PASSWORD=mypassword \ | |
| -e MYSQL_DATABASE=mydatabase \ | |
| -p 3306:3306 \ | |
| -d mysql:${{ matrix.mysql-version }} \ | |
| --log-bin=/var/lib/mysql/mysql-bin.log \ | |
| --gtid_mode=ON \ | |
| --enforce_gtid_consistency=ON \ | |
| --server-id=1 | |
| # The mongodb-github-action below doesn't use the Docker credentials for the pull. | |
| # We pre-pull, so that the image is cached. | |
| - name: Pre-pull Mongo image | |
| run: docker pull mongo:8.0 | |
| - name: Start MongoDB | |
| uses: supercharge/[email protected] | |
| with: | |
| mongodb-version: '8.0' | |
| mongodb-replica-set: test-rs | |
| - name: Start PostgreSQL (Storage) | |
| run: | | |
| docker run \ | |
| --health-cmd pg_isready \ | |
| --health-interval 10s \ | |
| --health-timeout 5s \ | |
| --health-retries 5 \ | |
| -e POSTGRES_PASSWORD=postgres \ | |
| -e POSTGRES_DB=powersync_storage_test \ | |
| -p 5431:5432 \ | |
| -d postgres:18 | |
| - name: Enable Corepack | |
| run: corepack enable | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version-file: '.nvmrc' | |
| cache: pnpm | |
| - name: Install dependencies | |
| run: pnpm install | |
| - name: Build | |
| shell: bash | |
| run: pnpm build | |
| - name: Test Replication | |
| run: pnpm --filter='./modules/module-mysql' test | |
| run-mongodb-tests: | |
| name: MongoDB Test | |
| runs-on: ubuntu-latest | |
| needs: run-core-tests | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| mongodb-version: ['6.0', '7.0', '8.0'] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Login to Docker Hub | |
| if: github.event_name != 'pull_request' | |
| uses: docker/login-action@v3 | |
| with: | |
| username: ${{ secrets.DOCKERHUB_USERNAME }} | |
| password: ${{ secrets.DOCKERHUB_TOKEN }} | |
| # The mongodb-github-action below doesn't use the Docker credentials for the pull. | |
| # We pre-pull, so that the image is cached. | |
| - name: Pre-pull Mongo image | |
| run: docker pull mongo:${{ matrix.mongodb-version }} | |
| - name: Start MongoDB | |
| uses: supercharge/[email protected] | |
| with: | |
| mongodb-version: ${{ matrix.mongodb-version }} | |
| mongodb-replica-set: test-rs | |
| - name: Start PostgreSQL (Storage) | |
| run: | | |
| docker run \ | |
| --health-cmd pg_isready \ | |
| --health-interval 10s \ | |
| --health-timeout 5s \ | |
| --health-retries 5 \ | |
| -e POSTGRES_PASSWORD=postgres \ | |
| -e POSTGRES_DB=powersync_storage_test \ | |
| -p 5431:5432 \ | |
| -d postgres:18 | |
| - name: Enable Corepack | |
| run: corepack enable | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version-file: '.nvmrc' | |
| cache: pnpm | |
| - name: Install dependencies | |
| run: pnpm install | |
| - name: Build | |
| shell: bash | |
| run: pnpm build | |
| - name: Test Replication | |
| run: pnpm --filter='./modules/module-mongodb' test | |
| - name: Test Storage | |
| run: pnpm --filter='./modules/module-mongodb-storage' test | |
| run-mssql-tests: | |
| name: MSSQL Test | |
| runs-on: ubuntu-latest | |
| needs: run-core-tests | |
| env: | |
| MSSQL_SA_PASSWORD: 321strong_ROOT_password | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| mssql-version: [2022, 2025] | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Login to Docker Hub | |
| if: github.event_name != 'pull_request' | |
| uses: docker/login-action@v3 | |
| with: | |
| username: ${{ secrets.DOCKERHUB_USERNAME }} | |
| password: ${{ secrets.DOCKERHUB_TOKEN }} | |
| - name: Start MSSQL | |
| run: | | |
| docker run \ | |
| --name MSSQLTestDatabase \ | |
| --health-cmd="/opt/mssql-tools18/bin/sqlcmd -C -S localhost -U sa -P \"${{ env.MSSQL_SA_PASSWORD }}\" -Q \"SELECT 1;\" || exit 1" \ | |
| --health-interval 5s \ | |
| --health-timeout 3s \ | |
| --health-retries 30 \ | |
| -e ACCEPT_EULA=Y \ | |
| -e MSSQL_SA_PASSWORD=${{ env.MSSQL_SA_PASSWORD }} \ | |
| -e MSSQL_PID=Developer \ | |
| -e MSSQL_AGENT_ENABLED=true \ | |
| -p 1433:1433 \ | |
| -d mcr.microsoft.com/mssql/server:${{ matrix.mssql-version }}-latest | |
| - name: Wait for MSSQL to be healthy | |
| run: | | |
| timeout 120 bash -c 'until docker inspect --format="{{.State.Health.Status}}" MSSQLTestDatabase | grep -q "healthy"; do sleep 2; done' | |
| - name: Initialize MSSQL database | |
| run: | | |
| docker run \ | |
| --rm \ | |
| --network host \ | |
| -e MSSQL_SA_PASSWORD=${{ env.MSSQL_SA_PASSWORD }} \ | |
| -v ${{ github.workspace }}/modules/module-mssql/ci/init-mssql.sql:/scripts/init-mssql.sql:ro \ | |
| mcr.microsoft.com/mssql/server:${{ matrix.mssql-version }}-latest \ | |
| /bin/bash -c "/opt/mssql-tools18/bin/sqlcmd -C -S localhost -U sa -P \"${{ env.MSSQL_SA_PASSWORD }}\" -v DATABASE=powersync -v DB_USER=sa -i /scripts/init-mssql.sql" | |
| # The mongodb-github-action below doesn't use the Docker credentials for the pull. | |
| # We pre-pull, so that the image is cached. | |
| - name: Pre-pull Mongo image | |
| run: docker pull mongo:8.0 | |
| - name: Start MongoDB | |
| uses: supercharge/[email protected] | |
| with: | |
| mongodb-version: '8.0' | |
| mongodb-replica-set: test-rs | |
| - name: Start PostgreSQL (Storage) | |
| run: | | |
| docker run \ | |
| --health-cmd pg_isready \ | |
| --health-interval 10s \ | |
| --health-timeout 5s \ | |
| --health-retries 5 \ | |
| -e POSTGRES_PASSWORD=postgres \ | |
| -e POSTGRES_DB=powersync_storage_test \ | |
| -p 5431:5432 \ | |
| -d postgres:18 | |
| - name: Enable Corepack | |
| run: corepack enable | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version-file: '.nvmrc' | |
| cache: pnpm | |
| - name: Install dependencies | |
| run: pnpm install | |
| - name: Build | |
| shell: bash | |
| run: pnpm build | |
| - name: Test Replication | |
| run: pnpm --filter='./modules/module-mssql' test |