You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@solr.apache.org by ds...@apache.org on 2026/07/10 02:54:36 UTC
(solr) 03/05: .github tests-via-crave.yml: CI=true (#4611)
This is an automated email from the ASF dual-hosted git repository.
dsmiley pushed a commit to branch branch_10x
in repository https://gitbox.apache.org/repos/asf/solr.git
commit d6ce30f1ee20039ff001c491204e24981888b0b4
Author: David Smiley <ds...@apache.org>
AuthorDate: Sun Jul 5 01:11:04 2026 -0400
.github tests-via-crave.yml: CI=true (#4611)
Ensure GHA based Crave runs set CI env.
Going to change crave to not assume this default in general, e.g. for user invoked interaction.
(cherry picked from commit 3c78fc0c7d8e33f2a5fae1966e70d9896be139d3)
---
.github/workflows/tests-via-crave.yml | 50 +++++++++++++++++++++--------------
1 file changed, 30 insertions(+), 20 deletions(-)
diff --git a/.github/workflows/tests-via-crave.yml b/.github/workflows/tests-via-crave.yml
index e3cc14f95d9..14d09a964b1 100644
--- a/.github/workflows/tests-via-crave.yml
+++ b/.github/workflows/tests-via-crave.yml
@@ -8,6 +8,10 @@ on:
- 'solr/**/src/**'
- 'gradle/libs.versions.toml'
+concurrency:
+ group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
+ cancel-in-progress: true
+
jobs:
test:
name: Run Solr Tests using Crave.io resources
@@ -15,24 +19,30 @@ jobs:
runs-on: self-hosted
timeout-minutes: 40
+ env:
+ # Use a PR-scoped workspace path so that each new run for the same PR
+ # destroys any leftover resources from a previous run (including cancelled
+ # runs whose cleanup step may not have completed in time).
+ CRAVE_WORKSPACE: /crave-devspaces/pipeline/prs/${{ github.event.pull_request.number }}
+
steps:
- - name: Destroy previous clone
- run: crave clone destroy -y /crave-devspaces/pipeline/runs/${GITHUB_RUN_ID}_${GITHUB_RUN_NUMBER} || echo "Clone did not exist"
- continue-on-error: true
- - name: Crave clone sources
- run: crave clone create --projectID 39 /crave-devspaces/pipeline/runs/${GITHUB_RUN_ID}_${GITHUB_RUN_NUMBER}
- - name: Checkout the correct branch
- run: |
- git -C /crave-devspaces/pipeline/runs/${GITHUB_RUN_ID}_${GITHUB_RUN_NUMBER} fetch origin ${GITHUB_REF}:${GITHUB_REF}
- git -C /crave-devspaces/pipeline/runs/${GITHUB_RUN_ID}_${GITHUB_RUN_NUMBER} checkout ${GITHUB_REF}
- - name: Initialize, build, test
- run: |
- cd /crave-devspaces/pipeline/runs/${GITHUB_RUN_ID}_${GITHUB_RUN_NUMBER}
- crave run --clean --message "PR: ${GITHUB_REF_NAME}" -- ./gradlew --console=plain test
- - name: Cleanup
- if: ${{ always() }}
- run: |
- pushd /crave-devspaces/pipeline/runs/${GITHUB_RUN_ID}_${GITHUB_RUN_NUMBER}
- crave stop --all
- popd
- crave clone destroy -y /crave-devspaces/pipeline/runs/${GITHUB_RUN_ID}_${GITHUB_RUN_NUMBER}
+ - name: Destroy previous clone
+ run: crave clone destroy -y ${CRAVE_WORKSPACE} || echo "Clone did not exist"
+ continue-on-error: true
+ - name: Crave clone sources
+ run: crave clone create --projectID 39 ${CRAVE_WORKSPACE}
+ - name: Checkout the correct branch
+ run: |
+ git -C ${CRAVE_WORKSPACE} fetch origin ${GITHUB_REF}:${GITHUB_REF}
+ git -C ${CRAVE_WORKSPACE} checkout ${GITHUB_REF}
+ - name: Initialize, build, test
+ run: |
+ cd ${CRAVE_WORKSPACE}
+ crave run --clean --message "PR: ${GITHUB_REF_NAME}" -- env CI=true ./gradlew --console=plain test
+ - name: Cleanup
+ if: ${{ always() }}
+ run: |
+ pushd ${CRAVE_WORKSPACE}
+ crave stop --all
+ popd
+ crave clone destroy -y ${CRAVE_WORKSPACE}