1
0
mirror of synced 2025-12-19 18:14:56 -05:00

fix(ci): use set -euo pipefail for shell tasks in poe (#60332)

This commit is contained in:
Aaron ("AJ") Steers
2025-05-16 14:34:12 -07:00
committed by GitHub
parent 15b5614d6d
commit ef18d815e1
2 changed files with 8 additions and 0 deletions

View File

@@ -32,6 +32,8 @@ test-all = [
"test-integration-tests",
]
test-unit-tests.shell = '''
set -euo pipefail
if [ -f ${POE_PWD}/unit_tests/pyproject.toml ]; then
echo "Found 'unit_tests/pyproject.toml' file, running unit tests..."
cd ${POE_PWD}/unit_tests
@@ -45,6 +47,8 @@ test-integration-tests = "airbyte-cdk connector test ${POE_PWD}"
format-check = "echo 'No format check step for this connector.'"
lock.shell = '''
set -euo pipefail
if [ -f ${POE_PWD}/unit_tests/pyproject.toml ]; then
echo "Found 'unit_tests/pyproject.toml' file, locking unit tests project..."
cd ${POE_PWD}/unit_tests

View File

@@ -38,6 +38,8 @@ lock = "poetry lock"
# Pytest
pytest-fast = "poetry run pytest --ff -m 'not slow and not requires_creds' --junitxml=build/test-results/pytest-fast-junit.xml unit_tests"
pytest-unit-tests.shell = '''
set -euo pipefail
if [ -d unit_tests ]; then
poetry run pytest --junitxml=build/test-results/pytest-unit-tests-junit.xml unit_tests
else
@@ -46,6 +48,8 @@ fi
'''
pytest-integration-tests.shell = '''
set -euo pipefail
if ls integration_tests/test_*.py >/dev/null 2>&1; then
poetry run pytest --junitxml=build/test-results/pytest-integration-tests-junit.xml integration_tests
else