forked from MIT-LCP/physionet-build
-
Notifications
You must be signed in to change notification settings - Fork 0
/
shippable.yml
65 lines (61 loc) · 2.7 KB
/
shippable.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
# use this to control what branches get built.
# http://docs.shippable.com/ci/advancedOptions/branches/
branches:
only:
- dev
# using pre-defined build variables
# full list http://docs.shippable.com/ci/advancedOptions/environmentVariables/
env:
global:
- TEST_RESULTS_DIR=$SHIPPABLE_REPO_DIR/shippable/testresults
- CODE_COVERAGE_DIR=$SHIPPABLE_REPO_DIR/shippable/codecoverage
- TESTS_LOC_DIR=$SHIPPABLE_REPO_DIR/tests
- MOD_LOC=$SHIPPABLE_REPO_DIR/node_modules/.bin/
- DJANGO_SETTINGS_MODULE=physionet.settings.development.pgsql
build:
pre_ci_boot:
image_name: debian
image_tag: buster
pull: true
# http://docs.shippable.com/ci/shippableyml/#ci
ci:
- "sudo apt-get update --yes"
- "sudo apt-get install python3-dev build-essential postgresql zip wget python-virtualenv --yes"
- "sudo service postgresql start"
- "virtualenv -p python3.7 env3"
- "source env3/bin/activate"
- "ln -sT .env.example .env"
- "pip install -r requirements.txt"
- "sudo apt-get install libseccomp-dev"
- sudo -u postgres psql -c "create user physionet with superuser password 'password';" -U postgres
- sudo -u postgres psql -c "create database physionet;" -U postgres
- "wget https://github.com/bemoody/wfdb/archive/10.6.2.tar.gz -O wfdb.tar.gz"
- "tar -xf wfdb.tar.gz"
- "(cd wfdb-* && ./configure --without-netfiles && sudo make -C lib install && sudo make -C data install)"
- "sudo ldconfig"
- "wget https://github.com/bemoody/lightwave/archive/bfe908a7f53434df61fd2444bf8c235e3e6226fc.tar.gz -O lightwave.tar.gz"
- "tar -xf lightwave.tar.gz"
- "(cd lightwave-* && make CGIDIR=/usr/local/bin sandboxed-server)"
- "wget https://github.com/mozilla/geckodriver/releases/download/v0.23.0/geckodriver-v0.23.0-linux64.tar.gz"
- "mkdir geckodriver"
- "tar -xf geckodriver-v0.23.0-linux64.tar.gz -C geckodriver"
- "export PATH=$PATH:$PWD/geckodriver"
- "cd physionet-django"
- "python manage.py makemigrations --dry-run --no-input --check"
- "python manage.py resetdb"
- "python manage.py loaddemo"
- "python manage.py test --verbosity=3 --keepdb"
- "coverage run --source='.' manage.py test --keepdb"
- "coverage xml -o $CODE_COVERAGE_DIR/coverage.xml"
# Integrations are used to connect external resources to CI
# http://docs.shippable.com/integrations/overview/
integrations:
# http://docs.shippable.com/ci/shippableyml/#notifications
notifications:
# turning of email for PR builds, get notified only on failure and change in status
# http://docs.shippable.com/integrations/notifications/email/
- integrationName: email
type: email
on_success: change
on_failure: always
on_pull_request: never