name: test cassandra-backup on: workflow_dispatch: schedule: - cron: '0 */2 * * *' concurrency: group: test-cassandra-backup cancel-in-progress: true permissions: contents: read jobs: test-backup: name: Test latest Cassandra backup runs-on: blacksmith-8vcpu-ubuntu-2404 timeout-minutes: 45 env: CASSANDRA_IMAGE: cassandra:5.0.6 CASS_CONTAINER: cass-${{ github.run_id }}-${{ github.run_attempt }} UTIL_CONTAINER: cass-util-${{ github.run_id }}-${{ github.run_attempt }} CASS_VOLUME: cassandra-data-${{ github.run_id }}-${{ github.run_attempt }} BACKUP_VOLUME: cassandra-backup-${{ github.run_id }}-${{ github.run_attempt }} MAX_HEAP_SIZE: 2G HEAP_NEWSIZE: 512M steps: - name: Checkout repository uses: actions/checkout@v6 - name: Set temp paths run: >- python3 scripts/ci/workflows/test_cassandra_backup.py --step set_temp_paths - name: Pre-clean run: >- python3 scripts/ci/workflows/test_cassandra_backup.py --step pre_clean - name: Install tools run: >- python3 scripts/ci/workflows/test_cassandra_backup.py --step install_tools - name: Find latest backup, validate freshness, download, decrypt, extract into Docker volume env: B2_KEY_ID: ${{ secrets.B2_KEY_ID }} B2_APPLICATION_KEY: ${{ secrets.B2_APPLICATION_KEY }} AGE_PRIVATE_KEY: ${{ secrets.CASSANDRA_AGE_PRIVATE_KEY }} run: >- python3 scripts/ci/workflows/test_cassandra_backup.py --step fetch_backup - name: Create data volume run: >- python3 scripts/ci/workflows/test_cassandra_backup.py --step create_data_volume - name: Restore keyspaces into volume and promote snapshot SSTables run: >- python3 scripts/ci/workflows/test_cassandra_backup.py --step restore_keyspaces - name: Start Cassandra run: >- python3 scripts/ci/workflows/test_cassandra_backup.py --step start_cassandra - name: Verify data run: >- python3 scripts/ci/workflows/test_cassandra_backup.py --step verify_data - name: Cleanup if: always() run: >- python3 scripts/ci/workflows/test_cassandra_backup.py --step cleanup - name: Report status if: always() env: JOB_STATUS: ${{ job.status }} run: >- python3 scripts/ci/workflows/test_cassandra_backup.py --step report_status