Skip to content

Commit 8b2feee

Browse files
committed
testjob
1 parent b295337 commit 8b2feee

File tree

1 file changed

+29
-1
lines changed

1 file changed

+29
-1
lines changed

.github/workflows/ci.yml

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ jobs:
7979
- name: Get code coverage
8080
id: coverage
8181
run: |
82-
echo "percentage=$(coverage report | grep -o '[0-9]\+%' | tail -1)"
82+
echo "percentage=$(coverage report | grep -o '[0-9]\+%' | tail -1)" >> $GITHUB_OUTPUT
8383
8484
eslint:
8585
runs-on: ubuntu-latest
@@ -97,3 +97,31 @@ jobs:
9797

9898
- name: Run ESLint
9999
run: npx eslint -c .config/.eslintrc.yml tcf_website/static/
100+
101+
probe_endpoint:
102+
name: Endpoint probe (compose)
103+
needs: [pylint, django, eslint]
104+
runs-on: ubuntu-latest
105+
steps:
106+
- uses: actions/checkout@v4
107+
108+
- name: Build & start stack
109+
run: |
110+
docker compose up -d --build
111+
112+
- name: Wait for app health
113+
run: |
114+
# Replace /health with your health endpoint
115+
for i in {1..60}; do
116+
if curl -fsS http://localhost:8000 > /dev/null; then
117+
echo "App is up"
118+
exit 0
119+
fi
120+
echo "Waiting for app..."
121+
sleep 2
122+
done
123+
echo "App did not become healthy in time"
124+
docker compose ps
125+
docker compose logs --no-color
126+
exit 1
127+

0 commit comments

Comments
 (0)