Skip to content

Commit a55248d

Browse files
committed
feat: add skip_tests input to release workflow for test bypass
- Introduced `skip_tests` input to optionally bypass Docker verification and test tasks during the release. - Updated workflow steps to conditionally execute based on `skip_tests` flag. - Modified Gradle release task to exclude test-related tasks when `skip_tests` is enabled.
1 parent 4bdcf78 commit a55248d

1 file changed

Lines changed: 15 additions & 3 deletions

File tree

.github/workflows/release.yml

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@ on:
1111
required: false
1212
default: ""
1313
type: string
14+
skip_tests:
15+
description: "Skip Docker verification and all test tasks, and run the release directly"
16+
required: false
17+
default: false
18+
type: boolean
1419

1520
permissions:
1621
contents: write
@@ -27,6 +32,7 @@ jobs:
2732
env:
2833
GRADLE_OPTS: -Dorg.gradle.daemon=false
2934
EXTRA_GRADLE_ARGS: ${{ github.event.inputs.gradle_args || '' }}
35+
SKIP_TESTS: ${{ github.event.inputs.skip_tests || 'false' }}
3036

3137
steps:
3238
- name: Checkout
@@ -52,16 +58,18 @@ jobs:
5258
git config user.email "github-actions[bot]@users.noreply.github.com"
5359
5460
- name: Verify Docker environment
61+
if: env.SKIP_TESTS != 'true'
5562
run: |
5663
docker version
5764
docker info
5865
5966
- name: Run Spark big data matrix tests
67+
if: env.SKIP_TESTS != 'true'
6068
run: |
6169
./gradlew --no-configuration-cache :example:spark:sparkBigDataMatrixTest --stacktrace --debug
6270
6371
- name: Collect and print Spark diagnostics on failure
64-
if: failure()
72+
if: failure() && env.SKIP_TESTS != 'true'
6573
run: |
6674
set +e
6775
diagnostics_dir="build/github-diagnostics"
@@ -123,7 +131,7 @@ jobs:
123131
cp -a example/spark/build/reports/tests "${diagnostics_dir}/spark/test-reports" 2>/dev/null || true
124132
125133
- name: Upload test reports and container logs
126-
if: failure()
134+
if: failure() && env.SKIP_TESTS != 'true'
127135
uses: actions/upload-artifact@v4
128136
with:
129137
name: test-diagnostics-${{ github.run_id }}-${{ github.run_attempt }}
@@ -149,4 +157,8 @@ jobs:
149157
SIGNING_KEY_FILE: ${{ runner.temp }}/signing-key.asc
150158
SIGNING_KEY_PASSWORD: ${{ secrets.SIGNING_KEY_PASSWORD }}
151159
run: |
152-
./gradlew --no-configuration-cache release --stacktrace --info $EXTRA_GRADLE_ARGS
160+
skip_test_args=""
161+
if [ "$SKIP_TESTS" = "true" ]; then
162+
skip_test_args="-x test -x sparkBigDataMatrixTest -x sparkApacheDepsApacheHmsTest -x sparkApacheDepsApacheHmsKerberosTest -x sparkApacheDepsClouderaHmsTest -x sparkApacheDepsClouderaHmsKerberosTest -x sparkClouderaDepsApacheHmsTest -x sparkClouderaDepsApacheHmsKerberosTest -x sparkClouderaDepsClouderaHmsTest -x sparkClouderaDepsClouderaHmsKerberosTest"
163+
fi
164+
./gradlew --no-configuration-cache release --stacktrace --info $skip_test_args $EXTRA_GRADLE_ARGS

0 commit comments

Comments
 (0)