Skip to content

Add Makefile section to README-dev.md #1795

Add Makefile section to README-dev.md

Add Makefile section to README-dev.md #1795

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/re-release.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/re-release.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@v5
- name: Set up JDK ${{ matrix.java-version }}
uses: actions/setup-java@v5
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@v4
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@v4
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@v5
- name: Set up JDK ${{ matrix.java-version }}
uses: actions/setup-java@v5
with:
java-version: ${{ matrix.java-version }}
distribution: 'temurin'
- name: Restore maven repository cache
uses: actions/cache/restore@v4
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@v5
- name: Set up JDK 8
uses: actions/setup-java@v5
with:
java-version: ${{ matrix.java-version }}
distribution: 'temurin'
- name: Restore maven repository cache
uses: actions/cache/restore@v4
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@v4
if: always()
with:
name: test-results
path: "*/**/target/*-reports/*.xml"
- name: Parse test results
uses: mikepenz/action-junit-report@v5
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@v5
- name: Setup Python 3
uses: actions/setup-python@v6
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]
fail-fast: false
steps:
- name: Checkout source
uses: actions/checkout@v5
- name: Set up JDK ${{ matrix.java-version }}
uses: actions/setup-java@v5
with:
java-version: ${{ matrix.java-version }}
distribution: 'temurin'
- name: Restore maven repository cache
uses: actions/cache/restore@v4
with:
path: ~/.m2/repository
key: ${{ runner.os }}-${{ matrix.java-version }}-maven-${{ hashFiles('**/pom.xml') }}
- name: Setup Python 3
uses: actions/setup-python@v6
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@v4
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@v4
with:
path: ~/.ccm/repository
key: ccm-cassandra-${{ runner.os }}-${{ steps.cassandra-version.outputs.value }}
- name: Run integration tests on Cassandra (${{ steps.cassandra-version.outputs.value }})
id: run-integration-tests
env:
CASSANDRA_VERSION_RESOLVED: ${{ steps.cassandra-version.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 }}
cp --parents ./**/target/*-reports/*.xml cassandra-${{ matrix.cassandra-version }}/
- name: Upload test results
if: steps.run-integration-tests.outcome == 'failure'
uses: actions/upload-artifact@v4
with:
name: test-results-${{ matrix.java-version }}-${{ matrix.cassandra-version }}
path: "*/**/target/*-reports/*.xml"
- name: Upload CCM logs
uses: actions/upload-artifact@v4
if: failure()
with:
name: ccm-log-cassandra-${{ matrix.java-version }}-${{ matrix.cassandra-version }}
path: /tmp/ccm*/ccm*/node*/logs/*
- name: Parse test results
uses: mikepenz/action-junit-report@v5
if: always()
with:
check_name: Integration tests report for Cassandra ${{ steps.cassandra-version.outputs.value }}
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]
fail-fast: false
steps:
- name: Checkout source
uses: actions/checkout@v5
- name: Set up JDK ${{ matrix.java-version }}
uses: actions/setup-java@v5
with:
java-version: ${{ matrix.java-version }}
distribution: 'temurin'
- name: Restore maven repository cache
uses: actions/cache/restore@v4
with:
path: ~/.m2/repository
key: ${{ runner.os }}-${{ matrix.java-version }}-maven-${{ hashFiles('**/pom.xml') }}
- name: Setup Python 3
uses: actions/setup-python@v6
with:
python-version: '3.13'
- name: Install CCM
run: make install-scylla-ccm
- name: Get scylla version
id: scylla-version
run: make resolve-scylla-version
- name: Pull CCM image from the cache
uses: actions/cache/restore@v4
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@v4
if: steps.ccm-cache.outputs.cache-hit != 'true'
with:
path: ~/.ccm/scylla-repository
key: ccm-scylla-${{ runner.os }}-${{ steps.scylla-version.outputs.value }}
- name: Run integration tests on Scylla (${{ steps.scylla-version.outputs.value }})
id: run-integration-tests
env:
SCYLLA_VERSION_RESOLVED: ${{ steps.scylla-version.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 }}
cp --parents ./**/target/*-reports/*.xml scylla-${{ matrix.scylla-version }}/
- name: Upload test results
uses: actions/upload-artifact@v4
if: steps.run-integration-tests.outcome == 'failure'
with:
name: test-results-${{ matrix.java-version }}-${{ matrix.scylla-version }}
path: "*/**/target/*-reports/*.xml"
- name: Upload CCM logs
uses: actions/upload-artifact@v4
if: failure()
with:
name: ccm-log-scylla-${{ matrix.java-version }}-${{ matrix.scylla-version }}
path: /tmp/ccm*/ccm*/node*/logs/*
- name: Parse test results
uses: mikepenz/action-junit-report@v5
if: always()
with:
check_name: Integration tests report for Scylla ${{ steps.scylla-version.outputs.value }}
require_tests: true
report_paths: "*/**/target/*-reports/*.xml"
follow_symlink: true
detailed_summary: true
updateComment: false
skip_annotations: true