Skip to content

Commit cf6bf32

Browse files
authored
CI: run bash with '-euo pipefail' (#11375)
1 parent 86df1b8 commit cf6bf32

40 files changed

+50
-54
lines changed

.github/actions/setup-rust/action.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,14 +44,14 @@ runs:
4444
if: ${{ runner.os == 'macOS' }}
4545
run: |
4646
echo "$(brew --prefix llvm@18)/bin" >> $GITHUB_PATH
47-
shell: bash
47+
shell: bash --noprofile --norc -euo pipefail {0}
4848

4949
- name: Check clang version
5050
if: ${{ runner.os == 'macOS' }}
5151
run: |
5252
clang --version
5353
which clang
54-
shell: bash
54+
shell: bash --noprofile --norc -euo pipefail {0}
5555

5656
- name: Set up GCP credentials
5757
uses: google-github-actions/auth@v2
@@ -60,7 +60,7 @@ runs:
6060
service_account: ${{ inputs.service_account }}
6161

6262
- name: Ensure correct version of Rust is installed
63-
shell: bash
63+
shell: bash --noprofile --norc -euo pipefail {0}
6464
run: |
6565
# This is the only way to force rustup to install the version of Rust
6666
# and the components/targets specified in our `rust-toolchain` file.
@@ -69,12 +69,12 @@ runs:
6969
7070
- name: Install additional targets
7171
if: ${{ inputs.targets != '' }}
72-
shell: bash
72+
shell: bash --noprofile --norc -euo pipefail {0}
7373
run: rustup target add ${{ inputs.targets }}
7474

7575
- name: Install additional toolchains
7676
if: ${{ inputs.toolchains }}
77-
shell: bash
77+
shell: bash --noprofile --norc -euo pipefail {0}
7878
run: |
7979
for toolchain in ${{ inputs.toolchains }}; do
8080
rustup install $toolchain
@@ -89,7 +89,7 @@ runs:
8989
gcs_read_only: false
9090

9191
- name: Verify sccache
92-
shell: bash
92+
shell: bash --noprofile --norc -euo pipefail {0}
9393
run: |
9494
sccache --show-stats
9595

.github/workflows/adhoc_wheels.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ on:
1414

1515
defaults:
1616
run:
17-
shell: bash
17+
shell: bash --noprofile --norc -euo pipefail {0}
1818

1919
permissions:
2020
contents: "write"

.github/workflows/auto_approve.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77

88
defaults:
99
run:
10-
shell: bash
10+
shell: bash --noprofile --norc -euo pipefail {0}
1111

1212
permissions:
1313
contents: "read"

.github/workflows/auto_docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ permissions:
1010

1111
defaults:
1212
run:
13-
shell: bash
13+
shell: bash --noprofile --norc -euo pipefail {0}
1414

1515
# The lack of `concurrency` is intentional.
1616
# We want this job to run on every commit, even if multiple are merged in a row.

.github/workflows/auto_docs_check.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ permissions:
1616

1717
defaults:
1818
run:
19-
shell: bash
19+
shell: bash --noprofile --norc -euo pipefail {0}
2020

2121
concurrency:
2222
group: pr-${{ github.event.pull_request.number }}-auto-docs-check

.github/workflows/checkboxes.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ concurrency:
1616

1717
defaults:
1818
run:
19-
shell: bash
19+
shell: bash --noprofile --norc -euo pipefail {0}
2020

2121
permissions:
2222
contents: "read"

.github/workflows/contrib_checks.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ env:
3636

3737
defaults:
3838
run:
39-
shell: bash
39+
shell: bash --noprofile --norc -euo pipefail {0}
4040

4141
permissions:
4242
contents: "read"
@@ -70,7 +70,6 @@ jobs:
7070
environments: py-docs
7171

7272
- name: Build via mkdocs
73-
shell: bash
7473
run: |
7574
pixi run -e py-docs mkdocs build --strict -f rerun_py/mkdocs.yml
7675

.github/workflows/contrib_rerun_py.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ env:
3030

3131
defaults:
3232
run:
33-
shell: bash
33+
shell: bash --noprofile --norc -euo pipefail {0}
3434

3535
permissions:
3636
contents: "read"

.github/workflows/nightly.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99

1010
defaults:
1111
run:
12-
shell: bash
12+
shell: bash --noprofile --norc -euo pipefail {0}
1313

1414
permissions:
1515
contents: "write"

.github/workflows/on_gh_release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ concurrency:
1919

2020
defaults:
2121
run:
22-
shell: bash
22+
shell: bash --noprofile --norc -euo pipefail {0}
2323

2424
permissions:
2525
# required for updating the release

0 commit comments

Comments
 (0)