Skip to content

Commit 823f521

Browse files
authored
Explicitly use Bash for job shell (#998)
It appears that the default shell in the custom runner image is not Bash, or else it's Bash running in POSIX mode. This leads to syntax problems with, e.g., `set`. We can avoid this by setting Bash as the default shell for the workflow.
1 parent bb4a44d commit 823f521

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

.github/workflows/ci-nightly-build-test.yaml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,10 @@ concurrency:
7171

7272
permissions: read-all
7373

74+
defaults:
75+
run:
76+
shell: bash -x {0}
77+
7478
jobs:
7579
Decision:
7680
runs-on: ubuntu-24.04
@@ -85,7 +89,6 @@ jobs:
8589
- name: Get number of commits in the last 24 hrs
8690
id: commits
8791
run: |
88-
set -x
8992
count=$(git log --oneline --since '24 hours ago' | wc -l)
9093
echo "count=$count" >> "$GITHUB_OUTPUT"
9194
@@ -112,24 +115,22 @@ jobs:
112115

113116
- name: Build wheel
114117
run: |
115-
set -x
116118
pip install --upgrade pip setuptools wheel
117119
# The next script does a pip install, configure, & bazel build.
118120
./scripts/build_pip_package_test.sh
119121
120122
- name: Test wheel
121123
run: |
122-
set -x
123124
./scripts/run_example.sh
124125
125126
- name: Test rest of TFQ
126127
run: |
127-
set -x -o pipefail
128+
set -o pipefail
128129
./scripts/test_all.sh 2>&1 | tee test_all.log
129130
130131
- name: Test tutorials
131132
run: |
132-
set -x -o pipefail
133+
set -o pipefail
133134
pip install jupyter
134135
pip install nbclient==0.6.5 jupyter-client==6.1.12 ipython==7.22.0
135136
pip install ipykernel==5.1.1

0 commit comments

Comments
 (0)