Skip to content

Commit

Permalink
Make all tests run before workflow fails
Browse files Browse the repository at this point in the history
  • Loading branch information
SenZmaKi committed May 22, 2024
1 parent 6af9717 commit 8e3c3d1
Showing 1 changed file with 30 additions and 10 deletions.
40 changes: 30 additions & 10 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
name: test

on:
push:
branches:
- master
pull_request:
branches:
on:
push:
branches:
- master

pull_request:
branches:
- master

schedule:
# 6:00 A.M UTC == 9:00 AM EAT
- cron: '0 6 * * *'
# 6:00 A.M UTC == 9:00 AM EAT
- cron: "0 6 * * *"

jobs:
test:
Expand All @@ -28,6 +28,7 @@ jobs:

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r dev-requirements.txt
poetry install
Expand All @@ -36,4 +37,23 @@ jobs:
run: poetry run ruff .

- name: Run Tests
run: poetry run poe test_ddl
run: |
declare -A exit_codes
tests=("test_pahe_ddl" "test_gogo_norm_ddl" "test_gogo_hls_ddl")
for test in "${tests[@]}"; do
poetry run poe $test || true
exit_codes[$test]=$?
done
for test in "${!exit_codes[@]}"; do
if [ ${exit_codes[$test]} -ne 0 ]; then
echo "$test failed with exit code ${exit_codes[$test]}"
fi
done
for exit_code in "${exit_codes[@]}"; do
if [ $exit_code -ne 0 ]; then
exit 1
fi
done

0 comments on commit 8e3c3d1

Please sign in to comment.