mirror of https://github.com/doccano/doccano.git
pythondatasetsactive-learningtext-annotationdatasetnatural-language-processingdata-labelingmachine-learningannotation-tool
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
50 lines
1.1 KiB
50 lines
1.1 KiB
language: python
|
|
|
|
python:
|
|
- "3.6"
|
|
|
|
env:
|
|
- DATABASE=sqlite
|
|
- DATABASE=postgres
|
|
|
|
services:
|
|
- docker
|
|
|
|
before_install:
|
|
- docker network create doccano
|
|
- >
|
|
if [[ "${DATABASE}" = "postgres" ]]; then
|
|
docker run --rm --name=postgres --network=doccano -d -e POSTGRES_USER=user -e POSTGRES_PASSWORD=pass -e POSTGRES_DB=db postgres
|
|
export DATABASE_URL="postgres://user:pass@postgres:5432/db?sslmode=disable"
|
|
fi
|
|
|
|
install:
|
|
- pip install mkdocs mkdocs-material
|
|
|
|
script:
|
|
- docker build --target=builder --tag=doccano-test .
|
|
- >
|
|
if [[ "${DATABASE}" != "sqlite" ]]; then
|
|
docker run --network doccano -e DATABASE_URL="${DATABASE_URL}" -it doccano-test sh -c 'app/manage.py migrate && app/manage.py test api.tests server.tests'
|
|
fi
|
|
|
|
before_deploy:
|
|
- mkdocs build --verbose --clean
|
|
|
|
deploy:
|
|
- provider: script
|
|
script: tools/cd.sh travis-${TRAVIS_BUILD_NUMBER}
|
|
on:
|
|
branch: master
|
|
|
|
- provider: script
|
|
script: tools/cd.sh ${TRAVIS_TAG}
|
|
on:
|
|
tags: true
|
|
|
|
- provider: pages
|
|
skip_cleanup: true
|
|
github_token: $GITHUB_TOKEN
|
|
local_dir: site
|
|
on:
|
|
branch: master
|