-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathappveyor.yml
76 lines (70 loc) · 3.34 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
65
66
67
68
69
70
71
72
73
74
75
76
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_DISABLED: True
PEEWEE_URL: postgres://postgres:Password12!@localhost/pacifica_metadata
METADATA_URL: http://127.0.0.1:8121
STATUS_URL: http://127.0.0.1:8121/keys?_id=104
ADMIN_USER_ID: 10
CACHE_SIZE: 0
BROKER_URL: redis://127.0.0.1:6379/0
BACKEND_URL: redis://127.0.0.1:6379/0
matrix:
- PYTHON: C:\Python36-x64
- PYTHON: C:\Python37-x64
- PYTHON: C:\Python38-x64
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/server.conf";
pacifica-metadata-cmd dbsync;
$md_proc = Start-Process C:\pacifica\Scripts\pacifica-metadata.exe -RedirectStandardError metadata-error.log -RedirectStandardOutput metadata-output.log -PassThru;
$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;
pushd C:\pacifica-metadata\pacifica-metadata-${MD_VERSION};
sleep 10; Invoke-WebRequest http://localhost:8121/users;
python tests\test_files\loadit_test.py;
popd;
$P_VERSION = `pip show pacifica-policy | grep Version: | awk '{ print $2 }';
Invoke-WebRequest https://github.com/pacifica/pacifica-policy/archive/v${P_VERSION}.zip -OutFile pacifica-policy.zip;
Expand-Archive pacifica-policy.zip -DestinationPath C:\pacifica-policy;
pushd C:\pacifica-policy\pacifica-policy-${P_VERSION};
python tests\test_files\loadit_test.py;
popd;
$md_proc | Stop-Process;
install:
- ps: >
& "$env:PYTHON\python.exe" -m virtualenv C:\pacifica;
Invoke-WebRequest -Uri "https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.5.1-windows-x86_64.zip" -OutFile "elasticsearch.zip";
Expand-Archive "elasticsearch.zip" -DestinationPath "C:\elasticsearch";
Start-Process C:\elasticsearch\elasticsearch-7.5.1\bin\elasticsearch;
C:\pacifica\Scripts\activate.ps1;
nuget install redis-64 -excludeversion;
redis-64\tools\redis-server.exe --service-install;
redis-64\tools\redis-server.exe --service-start;
python -m pip install --upgrade pip setuptools wheel;
pip install -r requirements-dev.txt;
pip install .;
pip install celery[redis] eventlet redis;
echo 'Done';
build: off
test_script:
- ps: >
mkdir C:\tmp; C:\pacifica\Scripts\activate.ps1;
pre-commit run -a;
cd tests;
$back_proc = Start-Process C:\pacifica\Scripts\coverage.exe -ArgumentList "run --include='*pacifica/elasticsearch/*' -p -m celery -A pacifica.elasticsearch.tasks worker -l info -P solo -c 1" -PassThru -RedirectStandardError celery-error.log -RedirectStandardOutput celery-output.log;
sleep 1;
coverage run --include='*pacifica/elasticsearch/*' -m pytest -xsv;
celery -A pacifica.elasticsearch.tasks control shutdown;
ls .coverage* | %{ coverage combine -a $_.name };
coverage report -m --fail-under=100;