Skip to content

Merge pull request #285 from fyvon/fix/perf_metric_length #67

Merge pull request #285 from fyvon/fix/perf_metric_length

Merge pull request #285 from fyvon/fix/perf_metric_length #67

Workflow file for this run

name: Django CI
on:
push:
branches:
- master
pull_request:
types: [opened, edited, reopened]
env:
DEBUG: False
ALLOWED_HOSTS: 'localhost'
PGS_LIVE_SITE: 'True'
DATABASE_NAME: 'db_test'
DATABASE_USER: 'postgres'
DATABASE_PASSWORD: 'postgres'
DATABASE_HOST: 'localhost'
DATABASE_PORT: 5432
DATABASE_PORT_LOCAL: 5432
REST_URL_ROOT: 'http://127.0.0.1/rest/'
ELASTICSEARCH_URL_ROOT: 'http://localhost:9200'
SECRET_KEY: 1234
jobs:
build:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:12
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: db_test
ports:
- 5432:5432
# needed because the postgres container does not provide a healthcheck
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -r requirements_local.txt
pip install requests
pip install xlrd openpyxl numpy
- name: Install Elasticsearch
run: |
curl https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.15.0-amd64.deb -o elasticsearch.deb
sudo dpkg -i --force-confnew elasticsearch.deb
sudo chown -R elasticsearch:elasticsearch /etc/default/elasticsearch
sudo service elasticsearch start
- name: Run migrations
run: python manage.py migrate
- name: Run Tests
run: python manage.py test catalog/tests curation/tests rest_api/tests