forked from felipelm/django-nginx-reactjs-docker
-
Notifications
You must be signed in to change notification settings - Fork 6
/
.travis.yml
44 lines (38 loc) · 1.4 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
38
39
40
41
42
43
44
#Travis Config File
services:
- docker
language: node_js
warnings_are_errors: true
matrix:
include:
#Backend Tests
- language: python
python: 3.6
provider: script
before_script:
- cd backend/
- pip install -r requirements.txt
script:
- docker-compose run --rm backend ./manage.py test tests
#APIs Tests (Local Environment Only)
- language: node_js
node_js: 10.15
provider: script
install:
- npm install newman
before_script:
- docker-compose up -d --build
- npm install frontend/
# creating a superuser
- docker exec -it projectthundercat_backend_1 python manage.py shell -c "from django.contrib.auth import get_user_model; User = get_user_model(); User.objects.create_superuser(username='admin', first_name='Admin', last_name='Account', birth_date='01/01/---1', pri_or_military_nbr='', email='admin@email.ca', password='Admin1234!');"
script:
- newman run backend/tests/postman/ThunderCAT.postman_collection.json -e backend/tests/postman/environments/local/ThunderCAT.local.postman_environment.json
#Frontend Tests
- language: node_js
node_js: 10.15
provider: script
before_script:
- docker-compose up -d --build
- npm install frontend/
script:
- docker-compose run -e CI=true --rm frontend npm test src/tests/ -- --coverage