110 строки
3.3 KiB
YAML
110 строки
3.3 KiB
YAML
language: python
|
|
dist: bionic
|
|
|
|
python:
|
|
- 3.8
|
|
|
|
addons:
|
|
apt:
|
|
packages: &global_deps
|
|
- cmake
|
|
- swig
|
|
- elasticsearch
|
|
- gettext
|
|
- librsvg2-bin
|
|
- pngcrush
|
|
- uuid
|
|
- libgit2-dev
|
|
|
|
jobs:
|
|
fast_finish: true
|
|
include:
|
|
- { env: TOXENV=codestyle }
|
|
- { env: TOXENV=docs }
|
|
- { env: TOXENV=assets }
|
|
- { env: TOXENV=addons-versions-files-ratings }
|
|
- { env: TOXENV=es ES_VERSION=6.x }
|
|
- { env: TOXENV=devhub }
|
|
- { env: TOXENV=reviewers-and-zadmin }
|
|
- { env: TOXENV=amo-lib-locales-and-signing }
|
|
- { env: TOXENV=main }
|
|
|
|
env:
|
|
global:
|
|
- secure: "BGRSmRIIYL+jEKo6nRTwcUZ4m4xiENX4VQqx8blQUsMtpy+XQaQiFwDsPzGyzyAHnbHOAvHBGrWHHRyoJlTqQJziZSZXXp273m6onjYfhmsfGyQoa39flfSlf8mVzSvpf8Te5SdO57scu0dsOt/SAnfRBNOzl1jnOLmO6eqZzHA="
|
|
- AUTOGRAPH_SERVER_URL: http://localhost:5500
|
|
|
|
cache:
|
|
pip: true
|
|
directories:
|
|
- node_modules
|
|
- $HOME/.gimme
|
|
|
|
services:
|
|
- memcached
|
|
- redis
|
|
|
|
before_install:
|
|
- curl -sL https://dev.mysql.com/get/mysql-apt-config_0.8.15-1_all.deb --output mysql-apt-config.deb
|
|
- sudo dpkg -i mysql-apt-config.deb
|
|
- sudo apt-get update -q
|
|
- sudo apt-get install -q -y --allow-unauthenticated -o Dpkg::Options::=--force-confnew mysql-server
|
|
- sudo systemctl restart mysql
|
|
- sudo mysql_upgrade
|
|
- |
|
|
if [ $TOXENV == "es" ]; then
|
|
if [ $ES_VERSION == "6.x" ]; then
|
|
curl -sL https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.8.8.deb --output elasticsearch.deb
|
|
sudo dpkg -i --force-confnew elasticsearch.deb
|
|
sudo sed -i.old 's/-Xms1g/-Xms128m/' /etc/elasticsearch/jvm.options
|
|
sudo sed -i.old 's/-Xmx1g/-Xmx128m/' /etc/elasticsearch/jvm.options
|
|
echo -e '-XX:+DisableExplicitGC\n-Djdk.io.permissionsUseCanonicalPath=true\n-Dlog4j.skipJansi=true\n-server\n' | sudo tee -a /etc/elasticsearch/jvm.options
|
|
sudo chown -R elasticsearch:elasticsearch /etc/default/elasticsearch
|
|
fi
|
|
sudo systemctl start elasticsearch
|
|
fi
|
|
- mysql -e 'create database olympia;'
|
|
- export GOPATH=$HOME/go
|
|
- export PATH=$HOME/usr/local/go/bin:$GOPATH/bin:$PATH
|
|
- sudo cp ./docker/etc/mime.types /etc/mime.types
|
|
|
|
install:
|
|
- nvm current
|
|
- nvm deactivate
|
|
- nvm install 10
|
|
- nvm use 10
|
|
- pip install --no-deps -r requirements/travis_base.txt
|
|
|
|
before_script:
|
|
- mysql --version
|
|
- node --version
|
|
- java -version
|
|
- |
|
|
if [ $TOXENV == "es" ]; then
|
|
curl --retry 3 --retry-delay 10 --retry-connrefused http://localhost:9200/;
|
|
fi
|
|
- sudo touch /addons-server-docker-container
|
|
|
|
script:
|
|
- |
|
|
if [ $TRAVIS_EVENT_TYPE != "cron" ]; then
|
|
if [ $TOXENV == "amo-lib-locales-and-signing" ] || [ $TOXENV == "reviewers-and-zadmin" ] ; then
|
|
docker run --name autograph -d -p 5500:5500 -v $(pwd)/scripts/:/scripts/ mozilla/autograph:3.3.2 /go/bin/autograph -c /scripts/autograph_travis_test_config.yaml
|
|
fi
|
|
RUNNING_IN_CI=True tox
|
|
fi
|
|
|
|
after_script:
|
|
- docker stop autograph
|
|
|
|
notifications:
|
|
slack:
|
|
if: branch = master
|
|
rooms:
|
|
- secure: VuUiui/fUMV6cXrYpTXrzLnYurcsJQOeczWA2rvsq8fCFjSe4MXMgv/kF/2b7F7O8mmEgQAUGozJAaChmYCiwDFOtki7bUBGl6yOm5OWW1ZnkTxObXB7pKG/aFT0VoF4EKIRp46M4tT8yqZ0m+CXP8/rITE0aLJoz/xmGzOaCc8=
|
|
on_success: change
|
|
on_failure: always
|
|
|
|
git:
|
|
depth: 1
|