Skip to content

Commit 196522b

Browse files
authored
ci: make sure bash has pipefail (apache#2423)
Continuation of apache#2421.
1 parent 1b37f4e commit 196522b

File tree

12 files changed

+56
-112
lines changed

12 files changed

+56
-112
lines changed

.github/workflows/csharp.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,11 @@ concurrency:
3636
permissions:
3737
contents: read
3838

39+
defaults:
40+
run:
41+
# 'bash' will expand to -eo pipefail
42+
shell: bash
43+
3944
jobs:
4045
csharp:
4146
name: "C# ${{ matrix.os }} ${{ matrix.dotnet }}"

.github/workflows/dev.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,11 @@ concurrency:
2828
permissions:
2929
contents: read
3030

31+
defaults:
32+
run:
33+
# 'bash' will expand to -eo pipefail
34+
shell: bash
35+
3136
jobs:
3237
pre-commit:
3338
name: "pre-commit"

.github/workflows/dev_pr.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,11 @@ permissions:
3131
issues: write
3232
pull-requests: write
3333

34+
defaults:
35+
run:
36+
# 'bash' will expand to -eo pipefail
37+
shell: bash
38+
3439
jobs:
3540
process:
3641
name: Process

.github/workflows/integration.yml

Lines changed: 4 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,10 @@ env:
4646
# Increment this to reset cache manually
4747
CACHE_NUMBER: "0"
4848

49+
defaults:
50+
run:
51+
shell: bash -l -eo pipefail {0}
52+
4953
jobs:
5054
duckdb:
5155
name: "DuckDB Integration Tests"
@@ -57,7 +61,6 @@ jobs:
5761
persist-credentials: false
5862
- name: Get Date
5963
id: get-date
60-
shell: bash
6164
run: |
6265
echo "today=$(/bin/date -u '+%Y%m%d')" >> $GITHUB_OUTPUT
6366
- name: Cache Conda
@@ -71,16 +74,13 @@ jobs:
7174
use-only-tar-bz2: false
7275
use-mamba: true
7376
- name: Install Dependencies
74-
shell: bash -l {0}
7577
run: |
7678
mamba install -c conda-forge \
7779
--file ci/conda_env_cpp.txt
7880
- name: Work around ASAN issue (GH-1617)
79-
shell: bash -l {0}
8081
run: |
8182
sudo sysctl vm.mmap_rnd_bits=28
8283
- name: Build DuckDB Integration Tests
83-
shell: bash -l {0}
8484
env:
8585
BUILD_ALL: "0"
8686
BUILD_DRIVER_MANAGER: "1"
@@ -92,7 +92,6 @@ jobs:
9292
run: |
9393
./ci/scripts/cpp_build.sh "$(pwd)" "$(pwd)/build"
9494
- name: Run DuckDB Integration Tests
95-
shell: bash -l {0}
9695
env:
9796
BUILD_ALL: "0"
9897
BUILD_INTEGRATION_DUCKDB: "1"
@@ -112,7 +111,6 @@ jobs:
112111
(. .env && echo "GO_VERSION=${GO}") >> $GITHUB_ENV
113112
- name: Get Date
114113
id: get-date
115-
shell: bash
116114
run: |
117115
echo "today=$(/bin/date -u '+%Y%m%d')" >> $GITHUB_OUTPUT
118116
- name: Cache Conda
@@ -126,7 +124,6 @@ jobs:
126124
use-only-tar-bz2: false
127125
use-mamba: true
128126
- name: Install Dependencies
129-
shell: bash -l {0}
130127
run: |
131128
mamba install -c conda-forge \
132129
--file ci/conda_env_cpp.txt \
@@ -139,18 +136,15 @@ jobs:
139136
cache: true
140137
cache-dependency-path: go/adbc/go.sum
141138
- name: Work around ASAN issue (GH-1617)
142-
shell: bash -l {0}
143139
run: |
144140
sudo sysctl vm.mmap_rnd_bits=28
145141
- name: Start SQLite server and Dremio
146-
shell: bash -l {0}
147142
run: |
148143
docker compose up --detach flightsql-test flightsql-sqlite-test dremio dremio-init
149144
pip install python-dotenv[cli]
150145
python -m dotenv -f .env list --format simple | tee -a $GITHUB_ENV
151146
152147
- name: Build FlightSQL Driver
153-
shell: bash -l {0}
154148
env:
155149
BUILD_ALL: "0"
156150
BUILD_DRIVER_FLIGHTSQL: "1"
@@ -159,23 +153,20 @@ jobs:
159153
./ci/scripts/cpp_build.sh "$(pwd)" "$(pwd)/build"
160154
./ci/scripts/python_build.sh "$(pwd)" "$(pwd)/build"
161155
- name: Test FlightSQL Driver against Dremio and SQLite
162-
shell: bash -l {0}
163156
env:
164157
BUILD_ALL: "0"
165158
BUILD_DRIVER_FLIGHTSQL: "1"
166159
run: |
167160
./ci/scripts/cpp_build.sh "$(pwd)" "$(pwd)/build"
168161
./ci/scripts/cpp_test.sh "$(pwd)/build"
169162
- name: Test Python Flight SQL driver against Dremio
170-
shell: bash -l {0}
171163
env:
172164
BUILD_ALL: "0"
173165
BUILD_DRIVER_FLIGHTSQL: "1"
174166
PYTEST_ADDOPTS: "--error-for-skips"
175167
run: |
176168
./ci/scripts/python_test.sh "$(pwd)" "$(pwd)/build"
177169
- name: Stop SQLite server and Dremio
178-
shell: bash -l {0}
179170
run: |
180171
docker compose down
181172
@@ -189,7 +180,6 @@ jobs:
189180
persist-credentials: false
190181
- name: Get Date
191182
id: get-date
192-
shell: bash
193183
run: |
194184
echo "today=$(/bin/date -u '+%Y%m%d')" >> $GITHUB_OUTPUT
195185
- name: Cache Conda
@@ -203,18 +193,15 @@ jobs:
203193
use-only-tar-bz2: false
204194
use-mamba: true
205195
- name: Install Dependencies
206-
shell: bash -l {0}
207196
run: |
208197
mamba install -c conda-forge \
209198
--file ci/conda_env_cpp.txt \
210199
--file ci/conda_env_python.txt
211200
pip install pytest-error-for-skips
212201
- name: Work around ASAN issue (GH-1617)
213-
shell: bash -l {0}
214202
run: |
215203
sudo sysctl vm.mmap_rnd_bits=28
216204
- name: Build PostgreSQL Driver
217-
shell: bash -l {0}
218205
env:
219206
BUILD_ALL: "0"
220207
BUILD_DRIVER_MANAGER: "1"
@@ -223,15 +210,13 @@ jobs:
223210
./ci/scripts/cpp_build.sh "$(pwd)" "$(pwd)/build"
224211
./ci/scripts/python_build.sh "$(pwd)" "$(pwd)/build"
225212
- name: Configure Integration Env Vars
226-
shell: bash -l {0}
227213
run: |
228214
pip install python-dotenv[cli]
229215
python -m dotenv -f .env list --format simple | tee -a $GITHUB_ENV
230216
echo "ADBC_USE_ASAN=ON" >> $GITHUB_ENV
231217
echo "ADBC_USE_UBSAN=ON" >> $GITHUB_ENV
232218
233219
- name: Test PostgreSQL Driver - postgres 13
234-
shell: bash -l {0}
235220
env:
236221
BUILD_ALL: "0"
237222
BUILD_DRIVER_POSTGRESQL: "1"
@@ -242,7 +227,6 @@ jobs:
242227
./ci/scripts/python_test.sh "$(pwd)" "$(pwd)/build"
243228
docker compose down
244229
- name: Test PostgreSQL Driver - postgres 14
245-
shell: bash -l {0}
246230
env:
247231
BUILD_ALL: "0"
248232
BUILD_DRIVER_POSTGRESQL: "1"
@@ -253,7 +237,6 @@ jobs:
253237
./ci/scripts/python_test.sh "$(pwd)" "$(pwd)/build"
254238
docker compose down
255239
- name: Test PostgreSQL Driver - postgres 15
256-
shell: bash -l {0}
257240
env:
258241
BUILD_ALL: "0"
259242
BUILD_DRIVER_POSTGRESQL: "1"
@@ -264,7 +247,6 @@ jobs:
264247
./ci/scripts/python_test.sh "$(pwd)" "$(pwd)/build"
265248
docker compose down
266249
- name: Test PostgreSQL Driver - postgres 16
267-
shell: bash -l {0}
268250
env:
269251
BUILD_ALL: "0"
270252
BUILD_DRIVER_POSTGRESQL: "1"
@@ -275,7 +257,6 @@ jobs:
275257
./ci/scripts/python_test.sh "$(pwd)" "$(pwd)/build"
276258
docker compose down
277259
- name: Test PostgreSQL Driver - postgres 17
278-
shell: bash -l {0}
279260
env:
280261
BUILD_ALL: "0"
281262
BUILD_DRIVER_POSTGRESQL: "1"
@@ -299,7 +280,6 @@ jobs:
299280
(. .env && echo "GO_VERSION=${GO}") >> $GITHUB_ENV
300281
- name: Get Date
301282
id: get-date
302-
shell: bash
303283
run: |
304284
echo "today=$(/bin/date -u '+%Y%m%d')" >> $GITHUB_OUTPUT
305285
- name: Cache Conda
@@ -313,13 +293,11 @@ jobs:
313293
use-only-tar-bz2: false
314294
use-mamba: true
315295
- name: Install Dependencies
316-
shell: bash -l {0}
317296
run: |
318297
mamba install -c conda-forge \
319298
--file ci/conda_env_cpp.txt \
320299
--file ci/conda_env_python.txt
321300
- name: Work around ASAN issue (GH-1617)
322-
shell: bash -l {0}
323301
run: |
324302
sudo sysctl vm.mmap_rnd_bits=28
325303
- uses: actions/setup-go@v5
@@ -329,7 +307,6 @@ jobs:
329307
cache: true
330308
cache-dependency-path: go/adbc/go.sum
331309
- name: Build and Test Snowflake Driver
332-
shell: bash -l {0}
333310
env:
334311
BUILD_ALL: "0"
335312
BUILD_DRIVER_SNOWFLAKE: "1"
@@ -338,7 +315,6 @@ jobs:
338315
./ci/scripts/cpp_build.sh "$(pwd)" "$(pwd)/build"
339316
./ci/scripts/cpp_test.sh "$(pwd)/build"
340317
- name: Build and Test Snowflake Driver (Python)
341-
shell: bash -l {0}
342318
env:
343319
BUILD_ALL: "0"
344320
BUILD_DRIVER_MANAGER: "1"

.github/workflows/java.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@ concurrency:
3636
permissions:
3737
contents: read
3838

39+
defaults:
40+
run:
41+
shell: bash -l -eo pipefail {0}
42+
3943
jobs:
4044
java:
4145
name: "Java ${{ matrix.java }}/Linux"
@@ -55,7 +59,6 @@ jobs:
5559
distribution: "temurin"
5660
java-version: ${{ matrix.java }}
5761
- name: Start test services
58-
shell: bash -l {0}
5962
run: |
6063
docker compose up --detach --wait flightsql-sqlite-test mssql-test postgres-test
6164
cat .env | grep -v -e '^#' | awk NF | tee -a $GITHUB_ENV

0 commit comments

Comments
 (0)