Skip to content

Commit 089fcf8

Browse files
committed
Fix GH Actions for doc-only PR
When there is no code change, some steps in the GA workflow can't run and cause errors. Put the `if condition` to check the code change in those steps. Signed-off-by: Yihong Wang <yh.wang@ibm.com>
1 parent d08c27e commit 089fcf8

File tree

2 files changed

+4
-18
lines changed

2 files changed

+4
-18
lines changed

.github/workflows/arrow-flight-tests.yml

+2-18
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ name: arrow flight tests
22

33
on:
44
pull_request:
5+
paths-ignore:
6+
- 'presto-docs/**'
57

68
env:
79
CONTINUOUS_INTEGRATION: true
@@ -12,22 +14,8 @@ env:
1214
RETRY: .github/bin/retry
1315

1416
jobs:
15-
changes:
16-
runs-on: ubuntu-latest
17-
permissions:
18-
pull-requests: read
19-
outputs:
20-
codechange: ${{ steps.filter.outputs.codechange }}
21-
steps:
22-
- uses: dorny/paths-filter@v2
23-
id: filter
24-
with:
25-
filters: |
26-
codechange:
27-
- '!presto-docs/**'
2817
test:
2918
runs-on: ubuntu-latest
30-
needs: changes
3119
strategy:
3220
fail-fast: false
3321
matrix:
@@ -42,13 +30,11 @@ jobs:
4230
steps:
4331
# Checkout the code only if there are changes in the relevant files
4432
- uses: actions/checkout@v4
45-
if: needs.changes.outputs.codechange == 'true'
4633
with:
4734
show-progress: false
4835

4936
# Set up Java and dependencies for the build environment
5037
- uses: actions/setup-java@v4
51-
if: needs.changes.outputs.codechange == 'true'
5238
with:
5339
distribution: 'temurin'
5440
java-version: 8
@@ -58,12 +44,10 @@ jobs:
5844

5945
# Install dependencies for the target module
6046
- name: Maven Install
61-
if: needs.changes.outputs.codechange == 'true'
6247
run: |
6348
export MAVEN_OPTS="${MAVEN_INSTALL_OPTS}"
6449
./mvnw install ${MAVEN_FAST_INSTALL} -am -pl ${{ matrix.modules }}
6550
6651
# Run Maven tests for the target module
6752
- name: Maven Tests
68-
if: needs.changes.outputs.codechange == 'true'
6953
run: ./mvnw test ${MAVEN_TEST} -pl ${{ matrix.modules }}

.github/workflows/tests.yml

+2
Original file line numberDiff line numberDiff line change
@@ -76,11 +76,13 @@ jobs:
7676
with:
7777
show-progress: false
7878
- uses: actions/setup-java@v4
79+
if: needs.changes.outputs.codechange == 'true'
7980
with:
8081
distribution: 'temurin'
8182
java-version: 8
8283
cache: 'maven'
8384
- name: Download nodejs to maven cache
85+
if: needs.changes.outputs.codechange == 'true'
8486
run: .github/bin/download_nodejs
8587
- name: Maven Install
8688
if: needs.changes.outputs.codechange == 'true'

0 commit comments

Comments
 (0)