name: Tests on: pull_request: branches: [main] push: branches: [main] jobs: test: runs-on: ubuntu-latest services: postgres: image: postgres:17 env: POSTGRES_DB: matitos POSTGRES_USER: supermatitos POSTGRES_PASSWORD: supermatitos ports: - 5432:5432 options: >- --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 env: DJANGO_SECRET_KEY: ci-test-secret DJANGO_ALLOWED_HOSTS: '*' DJANGO_ALLOWED_ORIGINS: 'http://localhost' DB_NAME: matitos DB_USER: supermatitos DB_PASSWORD: supermatitos DB_HOST: localhost DB_PORT: '5432' REDIS_CACHE_HOST: localhost REDIS_CACHE_PORT: '6379' REDIS_CELERY_HOST: localhost REDIS_CELERY_PORT: '6379' PATH_LOGS_DIRECTORY: /tmp/logs steps: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 with: python-version: '3.12' cache: 'pip' cache-dependency-path: app_urls/requirements.txt - name: Install dependencies run: pip install -r app_urls/requirements.txt - name: Run tests working-directory: app_urls run: python manage.py test fetcher.tests -v 2