Добавить собственные интеграционные тесты и CI-проверку

This commit is contained in:
2026-11-16 21:47:40 +00:00
parent d7a30a6c4a
commit 39197c218f
3 changed files with 155 additions and 0 deletions
+28
View File
@@ -0,0 +1,28 @@
name: Application
on: [push, pull_request]
permissions:
contents: read
jobs:
postgres-compose:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- run: python scripts/init_local.py
- run: docker compose config --quiet
- run: docker compose up -d --build --wait --wait-timeout 120
- run: make check test
- run: docker compose exec -T api python -m messenger.migrate
- run: |
docker compose cp student-tests api:/app/student-tests
docker compose exec -T api python -m unittest discover -s student-tests -v
- run: chmod +x scripts/restart.sh && make test-persistence ACTION_SCRIPT=scripts/restart.sh
- uses: actions/upload-artifact@v4
if: always()
with:
name: restart-evidence
path: evidence/restart-*.txt
- if: always()
run: docker compose down