Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 . |