-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #69 from maykinmedia/feature/set-up-travis
Set up Travis
- Loading branch information
Showing
5 changed files
with
14,327 additions
and
137 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
dist: bionic | ||
|
||
language: python | ||
|
||
cache: pip | ||
|
||
python: 3.8 | ||
|
||
services: | ||
- postgresql | ||
|
||
addons: | ||
postgresql: "10" | ||
|
||
env: | ||
global: | ||
- DJANGO_SETTINGS_MODULE=objects.conf.ci | ||
- SECRET_KEY=dummy | ||
- DB_PASSWORD= | ||
- DB_USER=postgres | ||
|
||
install: | ||
- pip install -r requirements/ci.txt | ||
- pip install codecov | ||
- npm ci | ||
- npm run build | ||
|
||
jobs: | ||
include: | ||
# Run jobs in parallel in stage Tests | ||
- stage: "Tests" | ||
name: "Unit tests" | ||
script: | ||
- python src/manage.py collectstatic --noinput --link | ||
- coverage run src/manage.py test src | ||
|
||
- name: "Code imports" | ||
before_install: skip | ||
install: | ||
- pip install isort | ||
before_script: skip | ||
script: isort . --check-only --diff | ||
|
||
- name: "Code format" | ||
before_install: skip | ||
install: | ||
- pip install black | ||
before_script: skip | ||
script: black --check src --diff | ||
|
||
after_success: | ||
- codecov |
Oops, something went wrong.