mirror of
https://github.com/QingdaoU/OnlineJudge.git
synced 2024-12-29 16:41:56 +00:00
22 lines
719 B
YAML
22 lines
719 B
YAML
language: python
|
|
python:
|
|
- "3.6"
|
|
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
|
|
install:
|
|
- pip install -r deploy/requirements.txt
|
|
- 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
|
|
- sleep 10 && python manage.py migrate
|
|
script:
|
|
- docker ps -a
|
|
- flake8 .
|
|
- coverage run --include="$PWD/*" manage.py test
|
|
- coverage report
|
|
notifications:
|
|
slack: onlinejudgeteam:BzBz8UFgmS5crpiblof17K2W
|