Skip to content

fix: replace SimpleStrategy with NetworkTopologyStrategy in integrati… #2309

fix: replace SimpleStrategy with NetworkTopologyStrategy in integrati…

fix: replace SimpleStrategy with NetworkTopologyStrategy in integrati… #2309

Workflow file for this run

name: 'Tests (Driver 4.x)'
on:
push:
branches: [ scylla-4.*x ]
paths-ignore:
- "docs/**"
- .github/workflows/docs-pages.yml
- .github/workflows/docs-pr.yml
- .github/workflows/release.yml
- "*.md"
- "*.sh"
- "renovate.json"
- ".snyk"
- ".gitignore"
pull_request:
branches: [ scylla-4.*x ]
paths-ignore:
- "docs/**"
- .github/workflows/docs-pages.yml
- .github/workflows/docs-pr.yml
- .github/workflows/release.yml
- "*.md"
- "*.sh"
- "renovate.json"
- ".snyk"
- ".gitignore"
workflow_dispatch:
jobs:
build:
name: Build
runs-on: ubuntu-latest
timeout-minutes: 10
strategy:
matrix:
java-version: [8]
fail-fast: false
steps:
- name: Checkout source
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
- name: Set up JDK ${{ matrix.java-version }}
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0
with:
java-version: ${{ matrix.java-version }}
distribution: 'temurin'
- name: Get POM hash
id: get-pom-hash
run: echo "value=${{ hashFiles('**/pom.xml') }}" >> "$GITHUB_OUTPUT"
- name: Restore maven repository cache
uses: actions/cache/restore@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
id: java-cache
with:
path: ~/.m2/repository
key: ${{ runner.os }}-${{ matrix.java-version }}-maven-${{ steps.get-pom-hash.outputs.value }}
- name: Compile source and tests
run: make compile-all
- name: Download test dependencies
if: steps.java-cache.outputs.cache-hit != 'true'
run: make download-all-dependencies
- name: Save maven repository cache
uses: actions/cache/save@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
if: steps.java-cache.outputs.cache-hit != 'true'
with:
path: ~/.m2/repository
key: ${{ runner.os }}-${{ matrix.java-version }}-maven-${{ steps.get-pom-hash.outputs.value }}
verify:
name: Full verify
runs-on: ubuntu-latest
timeout-minutes: 10
strategy:
matrix:
java-version: [8]
fail-fast: false
steps:
- name: Checkout source
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
- name: Set up JDK ${{ matrix.java-version }}
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0
with:
java-version: ${{ matrix.java-version }}
distribution: 'temurin'
- name: Restore maven repository cache
uses: actions/cache/restore@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
with:
path: ~/.m2/repository
key: ${{ runner.os }}-${{ matrix.java-version }}-maven-${{ hashFiles('**/pom.xml') }}
- name: Full verify
run: make check
unit-tests:
name: Unit tests
runs-on: ubuntu-latest
timeout-minutes: 10
strategy:
matrix:
java-version: [8]
fail-fast: false
steps:
- name: Checkout source
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
- name: Set up JDK 8
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0
with:
java-version: ${{ matrix.java-version }}
distribution: 'temurin'
- name: Restore maven repository cache
uses: actions/cache/restore@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
with:
path: ~/.m2/repository
key: ${{ runner.os }}-${{ matrix.java-version }}-maven-${{ hashFiles('**/pom.xml') }}
- name: Run unit tests
run: make test-unit
- name: Copy test results
if: always()
run: |
shopt -s globstar
mkdir unit
cp --parents ./**/target/*-reports/*.xml unit/
- name: Upload test results
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
if: always()
with:
name: test-results
path: "*/**/target/*-reports/*.xml"
- name: Parse test results
uses: mikepenz/action-junit-report@3585e9575db828022551b4231f165eb59a0e74e3 # v5.6.2
if: always()
with:
check_name: Unit tests report
require_tests: true
report_paths: "*/**/target/*-reports/*.xml"
follow_symlink: true
detailed_summary: true
updateComment: false
skip_annotations: true
setup-integration-tests:
name: Setup ITs
runs-on: ubuntu-latest
timeout-minutes: 2
steps:
- name: Checkout source
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
- name: Setup Python 3
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: '3.13'
cassandra-integration-tests:
name: Cassandra ITs
runs-on: ubuntu-latest
needs: [setup-integration-tests]
timeout-minutes: 90
strategy:
matrix:
cassandra-version: [3-LATEST, 4-LATEST]
java-version: [8]
test-group: [parallelizable, serial, isolated]
fail-fast: false
steps:
- name: Checkout source
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
- name: Set up JDK ${{ matrix.java-version }}
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0
with:
java-version: ${{ matrix.java-version }}
distribution: 'temurin'
- name: Restore maven repository cache
uses: actions/cache/restore@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
with:
path: ~/.m2/repository
key: ${{ runner.os }}-${{ matrix.java-version }}-maven-${{ hashFiles('**/pom.xml') }}
- name: Setup Python 3
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: '3.13'
- name: Setup environment
run: make install-cassandra-ccm
- name: Get cassandra version
id: cassandra-version
env:
CASSANDRA_VERSION: ${{ matrix.cassandra-version }}
run: make resolve-cassandra-version
- name: Pull CCM image from the cache
uses: actions/cache/restore@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
id: ccm-cache
with:
path: ~/.ccm/repository
key: ccm-cassandra-${{ runner.os }}-${{ steps.cassandra-version.outputs.value }}
- name: Download Cassandra (${{ steps.cassandra-version.outputs.value }}) image
if: steps.ccm-cache.outputs.cache-hit != 'true'
env:
CASSANDRA_VERSION_RESOLVED: ${{ steps.cassandra-version.outputs.value }}
run: make download-cassandra
- name: Save CCM image into the cache
if: steps.ccm-cache.outputs.cache-hit != 'true'
uses: actions/cache/save@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
with:
path: ~/.ccm/repository
key: ccm-cassandra-${{ runner.os }}-${{ steps.cassandra-version.outputs.value }}
- name: Determine test skip args
id: test-skip-args
run: |
case "${{ matrix.test-group }}" in
parallelizable) echo "value=-DskipSerialITs=true -DskipIsolatedITs=true" >> "$GITHUB_OUTPUT" ;;
serial) echo "value=-DskipParallelizableITs=true -DskipIsolatedITs=true" >> "$GITHUB_OUTPUT" ;;
isolated) echo "value=-DskipParallelizableITs=true -DskipSerialITs=true" >> "$GITHUB_OUTPUT" ;;
esac
- name: Run integration tests on Cassandra (${{ steps.cassandra-version.outputs.value }}) - ${{ matrix.test-group }}
id: run-integration-tests
env:
CASSANDRA_VERSION_RESOLVED: ${{ steps.cassandra-version.outputs.value }}
MAVEN_EXTRA_ARGS: ${{ steps.test-skip-args.outputs.value }}
run: make test-integration-cassandra
- name: Copy test results
if: steps.run-integration-tests.outcome == 'failure'
run: |
shopt -s globstar
mkdir cassandra-${{ matrix.cassandra-version }}-${{ matrix.test-group }}
cp --parents ./**/target/*-reports/*.xml cassandra-${{ matrix.cassandra-version }}-${{ matrix.test-group }}/
- name: Upload test results
if: steps.run-integration-tests.outcome == 'failure'
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: test-results-${{ matrix.java-version }}-${{ matrix.cassandra-version }}-${{ matrix.test-group }}
path: "*/**/target/*-reports/*.xml"
- name: Upload CCM logs
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
if: failure()
with:
name: ccm-log-cassandra-${{ matrix.java-version }}-${{ matrix.cassandra-version }}-${{ matrix.test-group }}
path: /tmp/ccm*/ccm*/node*/logs/*
- name: Parse test results
uses: mikepenz/action-junit-report@3585e9575db828022551b4231f165eb59a0e74e3 # v5.6.2
if: always()
with:
check_name: Integration tests report for Cassandra ${{ steps.cassandra-version.outputs.value }} (${{ matrix.test-group }})
require_tests: true
report_paths: "*/**/target/*-reports/*.xml"
follow_symlink: true
detailed_summary: true
updateComment: false
skip_annotations: true
scylla-integration-tests:
name: Scylla ITs
runs-on: ubuntu-latest
needs: [setup-integration-tests]
timeout-minutes: 90
strategy:
matrix:
scylla-version: [LTS-LATEST, LTS-PRIOR, LATEST]
java-version: [8]
test-group: [parallelizable, serial, isolated]
fail-fast: false
steps:
- name: Checkout source
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
- name: Set up JDK ${{ matrix.java-version }}
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0
with:
java-version: ${{ matrix.java-version }}
distribution: 'temurin'
- name: Restore maven repository cache
uses: actions/cache/restore@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
with:
path: ~/.m2/repository
key: ${{ runner.os }}-${{ matrix.java-version }}-maven-${{ hashFiles('**/pom.xml') }}
- name: Setup Python 3
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: '3.13'
- name: Install CCM
run: make install-scylla-ccm
- name: Get scylla version
id: scylla-version
env:
SCYLLA_VERSION: ${{ matrix.scylla-version }}
run: make resolve-scylla-version
- name: Pull CCM image from the cache
uses: actions/cache/restore@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
id: ccm-cache
with:
path: ~/.ccm/scylla-repository
key: ccm-scylla-${{ runner.os }}-${{ steps.scylla-version.outputs.value }}
- name: Download Scylla (${{ steps.scylla-version.outputs.value }}) image
if: steps.ccm-cache.outputs.cache-hit != 'true'
env:
SCYLLA_VERSION_RESOLVED: ${{ steps.scylla-version.outputs.value }}
run: make download-scylla
- name: Save CCM image into the cache
uses: actions/cache/save@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
if: steps.ccm-cache.outputs.cache-hit != 'true'
with:
path: ~/.ccm/scylla-repository
key: ccm-scylla-${{ runner.os }}-${{ steps.scylla-version.outputs.value }}
- name: Determine test skip args
id: test-skip-args
run: |
case "${{ matrix.test-group }}" in
parallelizable) echo "value=-DskipSerialITs=true -DskipIsolatedITs=true" >> "$GITHUB_OUTPUT" ;;
serial) echo "value=-DskipParallelizableITs=true -DskipIsolatedITs=true" >> "$GITHUB_OUTPUT" ;;
isolated) echo "value=-DskipParallelizableITs=true -DskipSerialITs=true" >> "$GITHUB_OUTPUT" ;;
esac
- name: Run integration tests on Scylla (${{ steps.scylla-version.outputs.value }}) - ${{ matrix.test-group }}
id: run-integration-tests
env:
SCYLLA_VERSION_RESOLVED: ${{ steps.scylla-version.outputs.value }}
MAVEN_EXTRA_ARGS: ${{ steps.test-skip-args.outputs.value }}
run: make test-integration-scylla
- name: Copy test results
if: steps.run-integration-tests.outcome == 'failure'
run: |
shopt -s globstar
mkdir scylla-${{ matrix.scylla-version }}-${{ matrix.test-group }}
cp --parents ./**/target/*-reports/*.xml scylla-${{ matrix.scylla-version }}-${{ matrix.test-group }}/
- name: Upload test results
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
if: steps.run-integration-tests.outcome == 'failure'
with:
name: test-results-${{ matrix.java-version }}-${{ matrix.scylla-version }}-${{ matrix.test-group }}
path: "*/**/target/*-reports/*.xml"
- name: Upload CCM logs
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
if: failure()
with:
name: ccm-log-scylla-${{ matrix.java-version }}-${{ matrix.scylla-version }}-${{ matrix.test-group }}
path: /tmp/ccm*/ccm*/node*/logs/*
- name: Parse test results
uses: mikepenz/action-junit-report@3585e9575db828022551b4231f165eb59a0e74e3 # v5.6.2
if: always()
with:
check_name: Integration tests report for Scylla ${{ steps.scylla-version.outputs.value }} (${{ matrix.test-group }})
require_tests: true
report_paths: "*/**/target/*-reports/*.xml"
follow_symlink: true
detailed_summary: true
updateComment: false
skip_annotations: true