Skip to content

Commit

Permalink
tests
Browse files Browse the repository at this point in the history
  • Loading branch information
abraryaser02 committed May 12, 2024
1 parent 3c76a68 commit 6a1d8b1
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,23 @@ jobs:
with:
python-version: '3.12'

- name: Install dependencies and set up RUM
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r services/backend/requirements.txt
- name: Add PostgreSQL APT Repository
run: |
sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
sudo apt-get update
sudo apt-get install -y git build-essential postgresql-server-dev-13 postgresql-13-rum
- name: Install PostgreSQL server dev and build tools
run: |
sudo apt-get install -y postgresql-server-dev-13 git build-essential
- name: Clone and build RUM extension
run: |
git clone https://github.com/postgrespro/rum /tmp/rum
cd /tmp/rum
make USE_PGXS=1
Expand All @@ -62,11 +73,3 @@ jobs:
DATABASE_URL: postgresql://postgres:postgres@localhost:5435/backend_dev
DATABASE_TEST_URL: postgresql://postgres:postgres@localhost:5435/backend_test
APP_SETTINGS: project.config.TestingConfig
PYTHONPATH: services/backend
run: |
cd services/backend
export APP_SETTINGS=project.config.TestingConfig
export PYTHONPATH=$(pwd)
export DATABASE_TEST_URL=postgresql://postgres:postgres@localhost:5435/backend_test
export DATABASE_URL=postgresql://postgres:postgres@localhost:5435/backend_dev
pytest

0 comments on commit 6a1d8b1

Please sign in to comment.