Skip to content

Merge pull request #117 from surfedushare/dependabot/pip/pytest-xdist… #427

Merge pull request #117 from surfedushare/dependabot/pip/pytest-xdist…

Merge pull request #117 from surfedushare/dependabot/pip/pytest-xdist… #427

Workflow file for this run

name: Service CI
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
strategy:
max-parallel: 4
matrix:
python-version: ["3.12"]
env:
APPLICATION_CONTEXT: unprivileged
APPLICATION_MODE: localhost
DET_POSTGRES_HOST: localhost
DET_POSTGRES_USER: postgres
AWS_ACCESS_KEY_ID: AKIAQIL2LTMHIQI5BFH2
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
services:
postgres:
image: postgres
env:
POSTGRES_PASSWORD: qwerty
POSTGRES_DB: middleware_publinova
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: psycopg2 prerequisites
run: sudo apt-get install python3-dev libpq-dev gettext
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Setup Repository
run: |
invoke aws.sync-repository-state --no-profile --bucket-prefix=pol-prod
invoke container.prepare-builds
- name: Run Tests
run: |
cd api
python manage.py runserver 8080 &
cd ..
sleep 120
invoke test.run