-
Notifications
You must be signed in to change notification settings - Fork 2
/
appveyor.yml
64 lines (58 loc) · 2.68 KB
/
appveyor.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
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
PEEWEE_URL: postgres://postgres:Password12!@localhost/pacifica_metadata
BROKER_URL: redis://localhost:6379/0
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.5.zip" -OutFile "elasticsearch.zip";
Expand-Archive "elasticsearch.zip" -DestinationPath "C:\elasticsearch";
Start-Process C:\elasticsearch\elasticsearch-5.6.5\bin\elasticsearch;
C:\pacifica\Scripts\activate.ps1;
python -m pip install --upgrade pip setuptools wheel;
pip install -r requirements-dev.txt;
pip install .;
echo 'Done';
build: off
before_test:
- ps: >
$env:PATH = "${env:PGSQL_PATH}\bin;${env:PYTHON}\Scripts;${env:PATH}";
createdb pacifica_metadata;
C:\pacifica\Scripts\activate.ps1;
$env:METADATA_CPCONFIG = "$PWD/travis/metadata/server.conf";
$env:POLICY_CPCONFIG = "$PWD/travis/policy/server.conf";
$env:METADATA_URL = "http://127.0.0.1:8121";
$env:STATUS_URL = "http://127.0.0.1:8121/groups";
pacifica-metadata-cmd dbsync;
Start-Process C:\pacifica\Scripts\pacifica-metadata.exe -RedirectStandardError metadata-error.log -RedirectStandardOutput metadata-output.log;
$MD_VERSION = `pip show pacifica-metadata | grep Version: | awk '{ print $2 }';
Invoke-WebRequest https://github.com/pacifica/pacifica-metadata/archive/v${MD_VERSION}.zip -OutFile pacifica-metadata.zip;
Expand-Archive pacifica-metadata.zip -DestinationPath C:\pacifica-metadata;
nuget install redis-64 -excludeversion;
redis-64\tools\redis-server.exe --service-install;
redis-64\tools\redis-server.exe --service-start;
Invoke-WebRequest http://localhost:8121/users;
pushd C:\pacifica-metadata\pacifica-metadata-${MD_VERSION};
python tests\test_files\loadit_test.py;
popd;
Start-Process C:\pacifica\Scripts\pacifica-policy.exe -RedirectStandardError policy-error.log -RedirectStandardOutput policy-output.log;
Start-Process C:\pacifica\Scripts\python.exe -ArgumentList "tests\cherrypy_catch_test.py" -RedirectStandardError catch-error.log -RedirectStandardOutput catch-output.log;
test_script:
- ps: >
mkdir C:\tmp; C:\pacifica\Scripts\activate.ps1;
pre-commit run -a;
$env:NOTIFICATIONS_CPCONFIG = "$PWD/server.conf";
cd tests;
coverage run --include='*/pacifica/notifications/*' -m pytest -vsx;
coverage report -m --fail-under=100;