-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy path.travis.yml
executable file
·37 lines (35 loc) · 1.18 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
language: python
services:
- postgresql
- redis-server
python:
- "3.8"
before_script:
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
- chmod +x ./cc-test-reporter
- psql -c "CREATE DATABASE test;" -U postgres
- psql -c "CREATE USER admin WITH PASSWORD 'adminadmin';" -U postgres
- psql -c "ALTER USER admin CREATEDB;" -U postgres
- export AUTHOR_NAME="$(git log -1 $TRAVIS_COMMIT --pretty="%aN")"
install:
- pip install pipenv==2022.4.8
- pipenv install --dev
script:
- pytest
- flake8
- bandit -r sme_sigpae_api -ll
#TODO: com grafana ta dando bug. verificar ExportModelOperationsMixin
# - mypy sme_sigpae_api
- bash utility/verifica_import_relativo.sh
- isort --check-only sme_sigpae_api
- docker build -t marcelomaia/terceirizadas_backend .
- docker run -d -p 8000:8000 marcelomaia/terceirizadas_backend python manage.py runserver --settings=config.settings.local
- docker ps -a
after_script:
- ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT
- bash utility/telegram_notification.sh
deploy:
provider: script
script: bash utility/deploy_dockerhub.sh
on:
all_branches: true