.travis.yml 1011 B

1234567891011121314151617181920212223242526272829303132333435
  1. dist: bionic
  2. jobs:
  3. include:
  4. - stage: build
  5. # TODO: Shallowly clone again once the .git folder is no longer required for building
  6. git:
  7. depth: false
  8. language: crystal
  9. crystal: latest
  10. before_install:
  11. - shards update
  12. - shards install
  13. install:
  14. - crystal build --warnings all --error-on-warnings src/invidious.cr
  15. script:
  16. - crystal tool format --check
  17. - crystal spec
  18. - stage: build_docker
  19. # TODO: Shallowly clone again once the .git folder is no longer required for building
  20. git:
  21. depth: false
  22. language: minimal
  23. services:
  24. - docker
  25. install:
  26. - docker-compose build
  27. script:
  28. - docker-compose up -d
  29. - sleep 15 # Wait for cluster to become ready, TODO: do not sleep
  30. - HEADERS="$(curl -I -s http://localhost:3000/)"
  31. - STATUS="$(echo $HEADERS | head -n1)"
  32. - if [[ "$STATUS" != *"200 OK"* ]]; then echo "$HEADERS"; exit 1; fi