Skip to content

Commit 8a9ba6e

Browse files
committed
chore: Add if/else check into the github workflow
1 parent f9f5384 commit 8a9ba6e

File tree

1 file changed

+12
-7
lines changed

1 file changed

+12
-7
lines changed

.github/workflows/dependency_compatibility_test.yaml

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,12 @@ jobs:
3232

3333
# Run in the root module which should test for everything barring showcase
3434
- name: Perform Dependency Compatibility Testing
35-
# Unless specifically inputted by the user, the `-l` argument will be empty
36-
# and the workflow will run with the default upper-bounds dependencies file
37-
run: ./.github/scripts/test_dependency_compatibility.sh -f dependencies.txt -l ${{ github.event.inputs.dependencies-list }}
38-
35+
run: |
36+
if [ -z ${{ github.event.inputs.dependencies-list }} ]
37+
./.github/scripts/test_dependency_compatibility.sh -f dependencies.txt
38+
else
39+
./.github/scripts/test_dependency_compatibility.sh -l ${{ github.event.inputs.dependencies-list }}
40+
fi
3941
# Set up local showcase server
4042
- name: Parse showcase version
4143
working-directory: java-showcase/gapic-showcase
@@ -51,7 +53,10 @@ jobs:
5153
cd -
5254
# Run for the Showcase tests
5355
- name: Perform Dependency Compatibility Testing (Showcase)
54-
# Unless specifically inputted by the user, the `-l` argument will be empty
55-
# and the workflow will run with the default upper-bounds dependencies file
56-
run: ../.github/scripts/test_dependency_compatibility.sh -f ../dependencies.txt -l ${{ github.event.inputs.dependencies-list }}
56+
run: |
57+
if [ -z ${{ github.event.inputs.dependencies-list }} ]
58+
../.github/scripts/test_dependency_compatibility.sh -f ../dependencies.txt
59+
else
60+
../.github/scripts/test_dependency_compatibility.sh -l ${{ github.event.inputs.dependencies-list }}
61+
fi
5762
working-directory: java-showcase

0 commit comments

Comments
 (0)