-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy path.travis.yml
70 lines (66 loc) · 3.33 KB
/
.travis.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
language: python
python: 2.7.17
services:
- redis-server
matrix:
include:
- name: 'Unit Tests'
env: TEST_SUITE=unit BOTO_CONFIG=/dev/null HPS_FORCE_ENABLE=True CASTLE_CMS_AUDIT_LOG_FIELD_MAP_PREFIX=full_message CASTLE_CMS_AUDIT_LOG_INSTANCE=travis HPS_INSTANCE_INDEX_PREFIX=test OPENSEARCH_HTTP_USERNAME=admin OPENSEARCH_HTTP_PASSWORD=admin OPENSEARCH_USE_SSL=yes OPENSEARCH_VERIFY_CERTS=no OPENSEARCH_SSL_SHOW_WARN=no
- name: 'Test Upgrades'
env: TEST_SUITE=upgrades BOTO_CONFIG=/dev/null HPS_FORCE_ENABLE=True CASTLE_CMS_AUDIT_LOG_FIELD_MAP_PREFIX=full_message CASTLE_CMS_AUDIT_LOG_INSTANCE=travis HPS_INSTANCE_INDEX_PREFIX=test OPENSEARCH_HTTP_USERNAME=admin OPENSEARCH_HTTP_PASSWORD=admin OPENSEARCH_USE_SSL=yes OPENSEARCH_VERIFY_CERTS=no OPENSEARCH_SSL_SHOW_WARN=no
- name: 'Robot: Firefox'
env: TEST_SUITE=robot ROBOT_BROWSER=firefox BOTO_CONFIG=/dev/null HPS_FORCE_ENABLE=True CASTLE_CMS_AUDIT_LOG_FIELD_MAP_PREFIX=full_message CASTLE_CMS_AUDIT_LOG_INSTANCE=travis HPS_INSTANCE_INDEX_PREFIX=test OPENSEARCH_HTTP_USERNAME=admin OPENSEARCH_HTTP_PASSWORD=admin OPENSEARCH_USE_SSL=yes OPENSEARCH_VERIFY_CERTS=no OPENSEARCH_SSL_SHOW_WARN=no
- name: 'Robot: Chrome'
env: TEST_SUITE=robot ROBOT_BROWSER=chrome BOTO_CONFIG=/dev/null HPS_FORCE_ENABLE=True CASTLE_CMS_AUDIT_LOG_FIELD_MAP_PREFIX=full_message CASTLE_CMS_AUDIT_LOG_INSTANCE=travis HPS_INSTANCE_INDEX_PREFIX=test OPENSEARCH_HTTP_USERNAME=admin OPENSEARCH_HTTP_PASSWORD=admin OPENSEARCH_USE_SSL=yes OPENSEARCH_VERIFY_CERTS=no OPENSEARCH_SSL_SHOW_WARN=no
arch: amd64
os: linux
dist: bionic
services:
- xvfb
addons:
chrome: stable
firefox: latest
before_script:
- export ROBOT_SELENIUM2LIBRARY_RUN_ON_FAILURE="Capture Page Screenshot"
- sleep 3
before_install:
- if [ "$TEST_SUITE" != "unit" ]; then
mkdir webdriver;
wget https://github.com/mozilla/geckodriver/releases/download/v0.23.0/geckodriver-v0.23.0-linux64.tar.gz;
tar -xzf geckodriver-v0.23.0-linux64.tar.gz -C webdriver;
wget https://chromedriver.storage.googleapis.com/2.40/chromedriver_linux64.zip;
unzip chromedriver_linux64.zip -d webdriver;
export PATH=$PATH:$(pwd)/webdriver;
npm install -g surge;
fi
- curl https://artifacts.opensearch.org/releases/bundle/opensearch/2.0.1/opensearch-2.0.1-linux-x64.tar.gz
- tar -zxf opensearch-2.0.1-linux-x64.tar.gz
- cd opensearch-2.0.1 && ./opensearch-tar-install.sh -Ediscovery.type=single-node && ./bin/opensearch &
install:
- mkdir -p {eggs,downloads}
- wget https://launchpad.net/plone/5.0/5.0.10/+download/Plone-5.0.10-UnifiedInstaller.tgz
- tar -zxvf Plone-*.tgz > /dev/null
- tar -xvjf Plone-*/packages/buildout-cache.tar.bz2 > /dev/null
- cp -rf buildout-cache/eggs/* eggs/
- cp -rf buildout-cache/downloads/* downloads/
- pip install -r requirements.txt
- if [ "$TEST_SUITE" == "unit" ]; then
pip install pyflakes==2.4.0 pycodestyle==2.8.0 flake8==3.9.2;
fi
- if [ "$TEST_SUITE" == "upgrades" ]; then
pip install requests;
fi
- buildout -Nc travis.cfg
script:
- if [ "$TEST_SUITE" == "unit" ]; then
flake8 castle/cms;
fi
- if [ "$TEST_SUITE" == "unit" ]; then
./bin/test -s castle.cms -t \!robot;
fi
- if [ "$TEST_SUITE" == "robot" ]; then
travis_retry bin/test -s castle.cms -t robot;
fi
- if [ "$TEST_SUITE" == "upgrades" ]; then
python test_upgrades.py;
fi