name: Pre-release CI on: pull_request: types: [opened, synchronize, reopened, labeled, unlabeled] workflow_dispatch: permissions: contents: read concurrency: group: ${{ github.workflow }}-${{ github.ref }} # Unrelated label events must not cancel an active pre-release run. Removing # pre-release-ci cancels it; the label guard below then skips replacement jobs. cancel-in-progress: >- ${{ github.event_name == 'pull_request' && (github.event.action == 'synchronize' || github.event.action == 'reopened' || github.event.label.name == 'pre-release-ci') }} jobs: wheels: name: Linux wheel builds and tests if: >- github.event_name == 'workflow_dispatch' || (contains(github.event.pull_request.labels.*.name, 'pre-release-ci') && (github.event.action != 'labeled' || github.event.label.name == 'pre-release-ci') && github.event.action != 'unlabeled') uses: ./.github/workflows/lib-build.yml with: target: linux other-wheels: name: Other platform wheel builds and tests if: >- github.event_name == 'workflow_dispatch' || (contains(github.event.pull_request.labels.*.name, 'pre-release-ci') && (github.event.action != 'labeled' || github.event.label.name == 'pre-release-ci') && github.event.action != 'unlabeled') uses: ./.github/workflows/lib-build.yml with: target: macos-x86,macos-arm,windows,linux-aarch64 build-sdist: false integration: name: Driver integration tests needs: scylla-release if: >- github.event_name == 'workflow_dispatch' || (contains(github.event.pull_request.labels.*.name, 'pre-release-ci') && (github.event.action != 'labeled' || github.event.label.name == 'pre-release-ci') && github.event.action != 'unlabeled') uses: ./.github/workflows/integration-tests.yml with: scylla-version: release:${{ needs.scylla-release.outputs.version }} scylla-release: name: Resolve stable Scylla and split test.py suites if: >- github.event_name == 'workflow_dispatch' || (contains(github.event.pull_request.labels.*.name, 'pre-release-ci') && (github.event.action != 'labeled' || github.event.label.name == 'pre-release-ci') && github.event.action != 'unlabeled') runs-on: ubuntu-24.04 timeout-minutes: 15 outputs: version: ${{ steps.release.outputs.version }} revision: ${{ steps.release.outputs.revision }} matrix: ${{ steps.plan.outputs.matrix }} toolchain: ${{ steps.plan.outputs.toolchain }} steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Resolve latest stable release tag once id: release run: | mkdir scylla-plan python3 scripts/scylla_release.py resolve --output scylla-plan/release.json - name: Check out matching release tests uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: repository: scylladb/scylladb ref: ${{ steps.release.outputs.revision }} path: scylla-tests persist-credentials: false - name: Split every Python and CQL suite into jobs id: plan run: | python3 scripts/scylla_release.py plan scylla-tests --output scylla-plan/jobs.json - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 with: name: scylla-test-plan path: scylla-plan scylla-testpy: name: Scylla test.py / ${{ matrix.name }} needs: [wheels, scylla-release] runs-on: ubuntu-24.04 timeout-minutes: 180 strategy: fail-fast: false max-parallel: 4 matrix: ${{ fromJSON(needs.scylla-release.outputs.matrix) }} env: SCYLLA_SOURCE: ${{ github.workspace }}/scylla-tests DRIVER_WHEEL_DIR: ${{ github.workspace }}/candidate-wheels SCYLLA_RELEASE_FILE: ${{ github.workspace }}/scylla-plan/release.json SCYLLA_PLAN_FILE: ${{ github.workspace }}/scylla-plan/jobs.json SCYLLA_TEST_JOB: ${{ matrix.name }} TESTPY_LOG_DIR: ${{ github.workspace }}/scylla-testpy-logs steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Check out matching release tests uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: repository: scylladb/scylladb ref: ${{ needs.scylla-release.outputs.revision }} path: scylla-tests persist-credentials: false - name: Fetch test helper submodules run: git -C scylla-tests submodule update --init --depth 1 seastar tools/cqlsh - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 with: name: scylla-test-plan path: scylla-plan - name: Download candidate Linux wheels uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 with: name: wheels-linux-ubuntu-24.04 path: candidate-wheels - name: Make room for the release toolchain run: | sudo rm -rf /usr/local/lib/android /usr/share/dotnet /opt/ghc df -h / - name: Pull this release's frozen toolchain env: SCYLLA_TOOLCHAIN: ${{ needs.scylla-release.outputs.toolchain }} run: docker pull "$SCYLLA_TOOLCHAIN" - name: Fetch Scylla with CCM and run test.py shard run: | mkdir -p "$TESTPY_LOG_DIR" cd "$SCYLLA_SOURCE" ./tools/toolchain/dbuild \ -v "$GITHUB_WORKSPACE:$GITHUB_WORKSPACE" \ -v "$RUNNER_TEMP:$RUNNER_TEMP" \ -e SCYLLA_SOURCE -e DRIVER_WHEEL_DIR -e TESTPY_LOG_DIR \ -e SCYLLA_RELEASE_FILE -e SCYLLA_PLAN_FILE -e SCYLLA_TEST_JOB \ -- bash "$GITHUB_WORKSPACE/scripts/run_scylla_testpy.sh" \ 2>&1 | tee "$TESTPY_LOG_DIR/bootstrap.log" - name: Upload Scylla test reports and logs if: always() uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 with: name: scylla-testpy-${{ matrix.name }}-logs path: | ${{ github.workspace }}/scylla-testpy-logs/*.log ${{ github.workspace }}/scylla-testpy-logs/*.txt ${{ github.workspace }}/scylla-testpy-logs/tests/report ${{ github.workspace }}/scylla-testpy-logs/tests/pytest_log ${{ github.workspace }}/scylla-testpy-logs/tests/pytest_tests_logs ${{ github.workspace }}/scylla-testpy-logs/tests/**/*.log if-no-files-found: warn retention-days: 7