2016-03-28 10:53:43 +00:00
|
|
|
language: python
|
|
|
|
python:
|
2017-09-13 14:37:57 +00:00
|
|
|
- "3.6"
|
2017-10-31 13:08:06 +00:00
|
|
|
services:
|
|
|
|
- redis-server
|
|
|
|
- docker
|
|
|
|
before_install:
|
|
|
|
- docker pull postgres:10
|
|
|
|
- docker run -it -d -e POSTGRES_DB=onlinejudge -e POSTGRES_USER=onlinejudge -e POSTGRES_PASSWORD=onlinejudge -p 127.0.0.1:5433:5432 postgres:10
|
2016-03-28 10:53:43 +00:00
|
|
|
install:
|
2017-01-23 08:05:52 +00:00
|
|
|
- pip install -r deploy/requirements.txt
|
|
|
|
- mkdir log test_case upload
|
|
|
|
- cp oj/custom_settings.example.py oj/custom_settings.py
|
|
|
|
- echo "SECRET_KEY=\"`cat /dev/urandom | head -1 | md5sum | head -c 32`\"" >> oj/custom_settings.py
|
|
|
|
- python manage.py migrate
|
|
|
|
- python manage.py initadmin
|
2016-03-28 10:53:43 +00:00
|
|
|
script:
|
2017-10-31 13:08:06 +00:00
|
|
|
- docker ps -a
|
2017-01-23 08:25:14 +00:00
|
|
|
- flake8 .
|
2017-11-23 13:12:37 +00:00
|
|
|
- coverage run --include="$PWD/*" manage.py test
|
2017-01-24 05:28:32 +00:00
|
|
|
- coverage report
|
2017-04-16 05:08:11 +00:00
|
|
|
notifications:
|
|
|
|
slack: onlinejudgeteam:BzBz8UFgmS5crpiblof17K2W
|