fix(ci): use set -euo pipefail for shell tasks in poe (#60332)
This commit is contained in:
committed by
GitHub
parent
15b5614d6d
commit
ef18d815e1
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user