Skip to content

Added files pylint, integration tests, CI, workflow #1153

Added files pylint, integration tests, CI, workflow

Added files pylint, integration tests, CI, workflow #1153

Workflow file for this run

name: CI Workflow

Check failure on line 1 in .github/workflows/ci.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/ci.yml

Invalid workflow file

Cannot define both `uses` and `steps` at the same time for the following jobs: call-reusable-workflow
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
call-reusable-workflow:
uses: ./.github/workflows/workflow.yml
services:
postgres:
image: postgres:16
env:
POSTGRES_HOST_AUTH_METHOD: trust
ports:
- 5433:5432
options: >-
--health-cmd "pg_isready -U postgres"
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- name: Set up Docker
uses: docker/setup-buildx-action@v2
- name: Install Docker Compose
run: |
sudo curl -L "https://github.com/docker/compose/releases/download/v2.20.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
- name: Create .env file
run: cp .env.dev .env
- name: Start services
run: docker compose -f docker-compose.dev.yaml up -d --build
- name: Run tests
run: |
docker-compose exec backend poetry run pytest web_app/tests
- name: Run tests coverage
run: |
docker-compose exec backend poetry run pytest --cov=web_app/tests --cov-fail-under=90
- name: Tear down
run: |
docker-compose down