Skip to content

Clean up DockerFile (#37) #93

Clean up DockerFile (#37)

Clean up DockerFile (#37) #93

Workflow file for this run

# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: Python application
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
permissions:
contents: read
env:
DATABASE_USER: db_bot
DATABASE_PASSWORD: test_p
TEST_DATABASE_NAME: test_db
jobs:
test-pipeline:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
with:
python-version: '3.10'
- name: Build Docker images
run: |
docker-compose build test-pipeline
docker-compose up -d test-db
- name: Check type hints
if: always()
run: docker-compose run test-pipeline mypy src
- name: Lint with ruff
if: always()
run: docker-compose run test-pipeline ruff src
- name: Check with bandit
if: always()
run: docker-compose run test-pipeline bandit -r src -c pyproject.toml
- name: Test with unit pytest
if: always()
run: |
docker-compose run test-pipeline pytest -m "not integration" --cov-report=xml --cov=.
- name: Test with integration pytest
if: always()
run: |
docker-compose run test-pipeline pytest -m integration --cov-report=xml --cov=. --cov-append