.travis.yml 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. # .travis.yml
  2. language: minimal
  3. sudo: required
  4. services:
  5. - docker
  6. env:
  7. global:
  8. - COMPOSE_PROJECT_NAME=musare
  9. - BACKEND_HOST=127.0.0.1
  10. - BACKEND_PORT=8080
  11. - FRONTEND_HOST=127.0.0.1
  12. - FRONTEND_PORT=80
  13. - FRONTEND_MODE=dev
  14. - MONGO_HOST=127.0.0.1
  15. - MONGO_PORT=27017
  16. - MONGO_ROOT_PASSWORD=PASSWORD_HERE
  17. - MONGO_USER_USERNAME=musare
  18. - MONGO_USER_PASSWORD=OTHER_PASSWORD_HERE
  19. - REDIS_HOST=127.0.0.1
  20. - REDIS_PORT=6379
  21. - REDIS_PASSWORD=PASSWORD
  22. before_install:
  23. # create config files from template
  24. - cp backend/config/template.json backend/config/default.json
  25. - cp frontend/dist/config/template.json frontend/dist/config/default.json
  26. jobs:
  27. include:
  28. - stage: frontend
  29. script:
  30. - docker-compose build frontend # build frontend
  31. - docker-compose up -d frontend # start frontend
  32. - docker-compose exec frontend /bin/bash -c "cd app && npm run lint" # using eslint to check for formatting/linting issues
  33. - stage: backend # This will eventually be used for proper unit tests etc.
  34. script:
  35. - docker-compose up -d mongo # start mongo (users automatically setup)
  36. - docker-compose up -d redis # start redis
  37. - docker-compose build backend # build backend
  38. - docker-compose up -d backend # start backend
  39. - docker-compose exec backend /bin/bash -c "npx eslint app/logic" # using eslint to check for formatting/linting issues