Skip to content

Commit cc270a7

Browse files
committed
Test Flask app in CI
1 parent 4d32f3a commit cc270a7

File tree

4 files changed

+22
-14
lines changed

4 files changed

+22
-14
lines changed

.github/workflows/stage-2-test.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,23 @@ jobs:
6161
- name: "Save the linting result"
6262
run: |
6363
echo "Nothing to save"
64+
test-flask:
65+
name: "Test Flask application"
66+
needs: set-up-dependencies
67+
runs-on: ubuntu-latest
68+
timeout-minutes: 5
69+
steps:
70+
- name: "Checkout code"
71+
uses: actions/checkout@v4
72+
73+
- name: "Install dependencies"
74+
run: |
75+
pip install pipenv
76+
pipenv install --dev --system
77+
78+
- name: "Run Flask test suite"
79+
run: |
80+
./test-app.sh
6481
test-unit:
6582
name: "Unit tests"
6683
needs: set-up-dependencies

test-integration.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
#!/bin/bash
2-
docker compose --env-file .env.test --profile test-integration run --build integration-tests pytest -v /tests/integration
3-
test_exit_code=$?
4-
docker compose --env-file .env.test --profile test-integration down db --volumes
5-
exit $test_exit_code
1+
2+
pytest -vv tests/integration || {
3+
echo "Tests failed in tests/integration"
4+
exit 1
5+
}

test.sh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,4 @@
22

33
./test-setup.sh
44
./test-unit.sh
5-
./test-pacts.sh
65
./test-integration.sh
7-
./test-end-to-end.sh

tests/integration/__init__.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +0,0 @@
1-
import os
2-
import sys
3-
4-
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
5-
sys.path.insert(0, os.path.dirname(SCRIPT_DIR) + "/../src/functions/message_status/")
6-
sys.path.insert(0, os.path.dirname(SCRIPT_DIR) + "/../src/functions/notify/")
7-
sys.path.insert(0, os.path.dirname(SCRIPT_DIR) + "/../src/shared/")

0 commit comments

Comments
 (0)