Skip to content

Update endpoint lgd-publication to support extra data #71

Update endpoint lgd-publication to support extra data

Update endpoint lgd-publication to support extra data #71

Workflow file for this run

name: G2P API tests
on: [pull_request]
permissions:
contents: read
actions: read
jobs:
test:
runs-on: ubuntu-latest
services:
mysql:
image: mysql:8.0
env:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: test_db
ports:
- 3306:3306
options: >-
--health-cmd="mysqladmin ping -h localhost" --health-interval=10s
--health-timeout=5s --health-retries=3
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Change to the root directory
run: cd /home/runner/work
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.10'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Create project config file
run: |
echo "# config.ini" > /home/runner/work/config.ini
echo "[database]" >> /home/runner/work/config.ini
echo "name=test_db" >> /home/runner/work/config.ini
echo "user=root" >> /home/runner/work/config.ini
echo "password=root" >> /home/runner/work/config.ini
echo "host=127.0.0.1" >> /home/runner/work/config.ini
echo "port=3306" >> /home/runner/work/config.ini
- name: Run Tests
run: |
export SECRET_KEY=$(openssl rand -base64 12)
python manage.py makemigrations
python manage.py migrate
python manage.py test gene2phenotype_app.tests
env:
PROJECT_CONFIG_PATH: /home/runner/work/config.ini
working-directory: gene2phenotype_project