name: Integration test CephObjectSuite on: pull_request: branches: - master - release-* defaults: run: # reference: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#using-a-specific-shell shell: bash --noprofile --norc -eo pipefail -x {0} # cancel the in-progress workflow when PR is refreshed. concurrency: group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }} cancel-in-progress: true jobs: TestCephObjectSuite: if: ${{ github.event_name == 'pull_request' && github.ref != 'refs/heads/master' && !contains(github.event.pull_request.labels.*.name, 'skip-ci') }} runs-on: ubuntu-20.04 strategy: fail-fast: false matrix: kubernetes-versions: ["v1.21.14", "v1.26.1"] steps: - name: checkout uses: actions/checkout@v3 with: fetch-depth: 0 - name: setup latest cluster resources uses: ./.github/workflows/integration-test-config-latest-k8s with: github-token: ${{ secrets.GITHUB_TOKEN }} kubernetes-version: ${{ matrix.kubernetes-versions }} - name: TestCephObjectSuite run: | tests/scripts/github-action-helper.sh collect_udev_logs_in_background export DEVICE_FILTER=$(lsblk|awk '/14G/ {print $1}'| head -1) SKIP_CLEANUP_POLICY=false go test -v -timeout 1800s -failfast -run CephObjectSuite github.com/rook/rook/tests/integration - name: collect common logs if: always() run: | export LOG_DIR="/home/runner/work/rook/rook/tests/integration/_output/tests/" export CLUSTER_NAMESPACE="object-ns" export OPERATOR_NAMESPACE="object-ns-system" tests/scripts/collect-logs.sh - name: Artifact uses: actions/upload-artifact@v3 if: failure() with: name: ceph-object-suite-artifact-${{ matrix.kubernetes-versions }} path: /home/runner/work/rook/rook/tests/integration/_output/tests/ - name: consider debugging if: failure() && github.event_name == 'pull_request' run: | # Enable tmate only in the Rook fork, where the USE_TMATE secret is set in the repo, or if the action is re-run if [ "$GITHUB_REPOSITORY_OWNER" = "rook" ] || [ -n "${{ secrets.USE_TMATE }}" ] || [ "$GITHUB_RUN_ATTEMPT" -gt 1 ]; then echo USE_TMATE=1 >> $GITHUB_ENV fi - name: set up tmate session for debugging if: failure() && env.USE_TMATE uses: mxschmitt/action-tmate@v3 timeout-minutes: 60