.gitlab-ci.yml 968 Bytes
Newer Older
1
stages:
2
    - test
3
    - staging
4
5

test-frontend:
6
  image: node:latest
7
  stage: test
8
  script:
9
10
11
12
13
14
15
    - apt-get update -yqqq
    - apt-get install -yqq xvfb
    - apt-get install iceweasel -yqq
    - apt-get install dbus-x11 -yqq
    - Xvfb :99 -screen 0 1280x720x24 -ac &
    - export DISPLAY=:99
    - export $(dbus-launch)
16
    - npm install 
17
    - npm install -g testcafe
18
    - testcafe --list-browsers
Vegard Murvold Sporstøl's avatar
Vegard Murvold Sporstøl committed
19
    - testcafe firefox frontend-test.js --skip-js-errors
20
21

test-backend:
22
  image: python:3.8
23
24
25
26
27
  stage: test
  script:
    - cd backend/secfit
    - apt-get update -qy
    - pip install -r requirements.txt
28
    - python manage.py test
29

30
31
32
33
staging:
  type: deploy
  image: ruby
  stage: staging
34
  script:
35
    - apt-get update -qy
36
37
    - apt-get install -y ruby-dev
    - gem install dpl
38
39
    - dpl --provider=heroku --app=secfit-group15-frontend --api-key=$HEROKU_API_KEY
    - dpl --provider=heroku --app=secfit-group15-backend --api-key=$HEROKU_API_KEY
40
41
  only:
    - master