tests: move docker service start in pytest

Signed-off-by: Kevin Decherf <kevin@kdecherf.com>
This commit is contained in:
Kevin Decherf
2023-07-22 17:17:11 +02:00
parent 62d1948e15
commit e38f9adb8b
3 changed files with 58 additions and 17 deletions

View File

@ -36,17 +36,14 @@ jobs:
- name: "Build image"
run: docker-compose -f tests/docker-compose.${{ matrix.database }}.yml build
- name: "Run image"
run: docker-compose -f tests/docker-compose.${{ matrix.database }}.yml up -d
- name: "Install dependencies"
run: pip install pytest requests
- name: "Check running instance"
run: docker ps
- name: "Wait 60s"
run: sleep 60
run: pip install pytest pytest-docker requests
- name: "Run tests"
run: py.test tests/
run: py.test --database=${{ matrix.database }} tests/
- name: "Get docker logs"
run: docker-compose -p "wallabag_${{ matrix.database }}" -f tests/docker-compose.${{ matrix.database }}.yml logs wallabag
- name: "Cleanup environment"
run: docker-compose -p "wallabag_${{ matrix.database }}" -f tests/docker-compose.${{ matrix.database }}.yml down -v