-
Notifications
You must be signed in to change notification settings - Fork 1
34 lines (31 loc) · 980 Bytes
/
tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
name: Tests (PyTest, Coverage)
on:
pull_request:
branches: ["main", "dev"]
workflow_dispatch:
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
name: Tests
steps:
- uses: actions/checkout@v3
- name: Build containers (Docker-Compose)
working-directory: ./src
run: docker-compose -f ./docker-compose.yml up -d --build
- name: Check docker containers
working-directory: ./src
run: docker ps -a
- name: Wait for start
run: sleep 5
- name: Check docker containers (After wait for start)
working-directory: ./src
run: docker ps -a
- name: Ping web server.
run: curl http://localhost/utils/getServerTime || true
- name: Display startup logs.
run: docker logs florgon-cc-api_server_1
- name: Unit tests (PyTest, Coverage)
working-directory: ./src/app
run: docker exec florgon-cc-api_server_1 pytest --cov=app .