|
| 1 | +name: Cloud Integration |
| 2 | + |
| 3 | +on: |
| 4 | + workflow_dispatch: |
| 5 | + schedule: |
| 6 | + - cron: "0 3 * * 1-5" |
| 7 | + |
| 8 | +permissions: |
| 9 | + contents: read |
| 10 | + |
| 11 | +concurrency: |
| 12 | + group: cloud-integration-${{ github.ref }} |
| 13 | + cancel-in-progress: false |
| 14 | + |
| 15 | +jobs: |
| 16 | + cloud-integration: |
| 17 | + name: Cloud integration tests |
| 18 | + runs-on: ubuntu-latest |
| 19 | + environment: cloud-integration |
| 20 | + env: |
| 21 | + CLICKHOUSE_CLOUD_API_KEY: ${{ secrets.CLICKHOUSE_CLOUD_API_KEY }} |
| 22 | + CLICKHOUSE_CLOUD_API_SECRET: ${{ secrets.CLICKHOUSE_CLOUD_API_SECRET }} |
| 23 | + CLICKHOUSE_CLOUD_TEST_ORG_ID: ${{ secrets.CLICKHOUSE_CLOUD_TEST_ORG_ID }} |
| 24 | + CLICKHOUSE_CLOUD_TEST_PROVIDER: ${{ secrets.CLICKHOUSE_CLOUD_TEST_PROVIDER }} |
| 25 | + CLICKHOUSE_CLOUD_TEST_REGION: ${{ secrets.CLICKHOUSE_CLOUD_TEST_REGION }} |
| 26 | + CLICKHOUSE_CLOUD_TEST_TIMEOUT_CREATE_SECS: ${{ vars.CLICKHOUSE_CLOUD_TEST_TIMEOUT_CREATE_SECS || '1800' }} |
| 27 | + CLICKHOUSE_CLOUD_TEST_TIMEOUT_DELETE_SECS: ${{ vars.CLICKHOUSE_CLOUD_TEST_TIMEOUT_DELETE_SECS || '900' }} |
| 28 | + CLICKHOUSE_CLOUD_TEST_TIMEOUT_STEADY_STATE_SECS: ${{ vars.CLICKHOUSE_CLOUD_TEST_TIMEOUT_STEADY_STATE_SECS || '1800' }} |
| 29 | + RUST_TEST_THREADS: 1 |
| 30 | + |
| 31 | + steps: |
| 32 | + - uses: actions/checkout@v4 |
| 33 | + |
| 34 | + - name: Install Rust toolchain |
| 35 | + uses: dtolnay/rust-toolchain@stable |
| 36 | + |
| 37 | + - name: Build clickhousectl |
| 38 | + run: cargo build |
| 39 | + |
| 40 | + - name: Run fast tests |
| 41 | + run: cargo test |
| 42 | + |
| 43 | + - name: Run cloud integration suite |
| 44 | + env: |
| 45 | + CLICKHOUSECTL_BIN: target/debug/clickhousectl |
| 46 | + run: cargo test --test cloud_cli cloud_service_crud_lifecycle -- --ignored --nocapture --test-threads=1 |
| 47 | + |
| 48 | + - name: Upload debug artifacts on failure |
| 49 | + if: failure() |
| 50 | + uses: actions/upload-artifact@v4 |
| 51 | + with: |
| 52 | + name: cloud-integration-debug |
| 53 | + path: | |
| 54 | + target/debug/clickhousectl |
| 55 | + target/debug/deps/cloud_cli-* |
0 commit comments