pacifica/pacifica-metadata

View on GitHub
appveyor.yml

Summary

Maintainability
Test Coverage
version: 0.1.{build}
pull_requests:
  do_not_increment_build_number: true

services:
- postgresql

environment:
  PGUSER: postgres
  PGPASSWORD: Password12!
  PGSQL_PATH: C:\Program Files\PostgreSQL\9.6
  NOTIFICATIONS_URL: http://127.0.0.1:8080
  PEEWEE_URL: postgres://postgres:Password12!@localhost/pacifica_metadata
  matrix:
  - PYTHON: C:\Python36-x64
  - PYTHON: C:\Python37-x64
  - PYTHON: C:\Python38-x64

install:
- ps: >
    & "$env:PYTHON\python.exe" -m virtualenv C:\pacifica;
    Invoke-WebRequest -Uri "https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-5.6.14.zip" -OutFile "elasticsearch.zip";
    Expand-Archive "elasticsearch.zip" -DestinationPath "C:\elasticsearch";
    C:\pacifica\Scripts\activate.ps1;
    python -m pip install --upgrade pip setuptools wheel;
    pip install -r requirements-dev.txt;
    pip install .;
    pip uninstall -y pacifica-metadata;
    pip install 'celery[eventlet]' eventlet;
    echo 'Done';

build: off

before_test:
- ps: >
    $env:PATH = "${env:PGSQL_PATH}\bin;${env:PYTHON}\Scripts;${env:PATH}";
    createdb pacifica_metadata;
    createdb pacifica_metadata_upgrade;
    C:\pacifica\Scripts\activate.ps1;
    Start-Process C:\pacifica\Scripts\python.exe -ArgumentList "tests\cherrypy_catch_test.py" -RedirectStandardError catch-error.log -RedirectStandardOutput catch-output.log;


test_script:
- ps: >
    $env:METADATA_CPCONFIG = "$PWD/server.conf";
    mkdir C:\tmp; C:\pacifica\Scripts\activate.ps1;
    $es_proc = Start-Process C:\elasticsearch\elasticsearch-5.6.14\bin\elasticsearch -PassThru;
    pre-commit run -a;
    cd tests;
    coverage run --include='*/pacifica/metadata/*' --omit='*/pacifica/metadata/admin_cmd*,*/pacifica/metadata/orm/sync*' -m pytest -xv orm;
    coverage run --include='*/pacifica/metadata/*' --omit='*/pacifica/metadata/admin_cmd*,*/pacifica/metadata/orm/sync*' -a -m pytest -xv core;
    coverage run --include='*/pacifica/metadata/*' --omit='*/pacifica/metadata/admin_cmd*,*/pacifica/metadata/orm/sync*' -a -m pytest -xv rest;
    coverage report -m --fail-under=100;