fail python test when tests fail
This commit is contained in:
parent
482fef46a1
commit
359d351e20
|
@ -1,12 +1,26 @@
|
||||||
#/bin/bash
|
#/bin/bash
|
||||||
|
|
||||||
|
failed='f'
|
||||||
# Starting at repo root
|
# Starting at repo root
|
||||||
|
|
||||||
|
echo "::group::Airtime Analyzer"
|
||||||
cd python_apps/airtime_analyzer
|
cd python_apps/airtime_analyzer
|
||||||
nosetests . -x
|
if ! nosetests . -x; then
|
||||||
|
failed='t'
|
||||||
|
fi
|
||||||
|
echo "::endgroup"
|
||||||
|
|
||||||
|
echo "::group::API Client"
|
||||||
cd ../api_clients
|
cd ../api_clients
|
||||||
nosetests . -x
|
if ! nosetests . -x; then
|
||||||
|
failed='t'
|
||||||
|
fi
|
||||||
|
echo "::endgroup"
|
||||||
|
|
||||||
# Reset to repo root
|
# Reset to repo root
|
||||||
cd ../..
|
cd ../..
|
||||||
|
if [[ "$failed" = "t" ]]; then
|
||||||
|
echo "Python tests failed"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
echo "Python tests passed!"
|
||||||
|
|
|
@ -8,7 +8,7 @@ on:
|
||||||
paths-ignore:
|
paths-ignore:
|
||||||
- 'docs/**'
|
- 'docs/**'
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test-bionic:
|
test-bionic:
|
||||||
runs-on: ubuntu-18.04
|
runs-on: ubuntu-18.04
|
||||||
|
@ -36,7 +36,7 @@ jobs:
|
||||||
- name: Run Python tests
|
- name: Run Python tests
|
||||||
run: |
|
run: |
|
||||||
sudo bash ./.github/scripts/python-pkg-install.sh
|
sudo bash ./.github/scripts/python-pkg-install.sh
|
||||||
sudo bash ./.github/scripts/python-pkg-test.sh
|
./.github/scripts/python-pkg-test.sh
|
||||||
- name: Run PHP tests
|
- name: Run PHP tests
|
||||||
run: |
|
run: |
|
||||||
composer install --no-progress --dev
|
composer install --no-progress --dev
|
||||||
|
@ -74,4 +74,4 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
composer install --no-progress --dev
|
composer install --no-progress --dev
|
||||||
cd airtime_mvc/tests
|
cd airtime_mvc/tests
|
||||||
php ../../vendor/bin/phpunit
|
php ../../vendor/bin/phpunit
|
||||||
|
|
Loading…
Reference in New Issue