-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathappveyor.yml
58 lines (51 loc) · 2.11 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
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
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
matrix:
- PYTHON: C:\Python36-x64
- PYTHON: C:\Python37-x64
- PYTHON: C:\Python38-x64
install:
- ps: >
& "$env:PYTHON\python.exe" -m virtualenv C:\pacifica;
C:\pacifica\Scripts\activate.ps1;
python -m pip install --upgrade pip setuptools wheel;
pip install .;
pip install -r requirements-dev.txt;
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/server.conf";
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;
pushd C:\pacifica-metadata\pacifica-metadata-${MD_VERSION};
sleep 10; Invoke-WebRequest http://localhost:8121/users;
python tests\test_files\loadit_test.py;
popd;
python tests\test_files\loadit_test.py;
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;
coverage run --include='*/site-packages/pacifica/policy/*' -m pytest -xsv tests;
coverage report -m --fail-under=100;