|
|
@@ -0,0 +1,43 @@
|
|
|
+stages:
|
|
|
+ - test
|
|
|
+
|
|
|
+variables:
|
|
|
+ APP_ENV: ci
|
|
|
+ SSH_PRIVATE_KEY: $SSH_PRIVATE_KEY
|
|
|
+
|
|
|
+before_script:
|
|
|
+ - apt-get -yqq update
|
|
|
+ - apt-get -yqq install zip unzip git openssh-client
|
|
|
+
|
|
|
+ # Run ssh-agent and add private key
|
|
|
+ - eval $(ssh-agent -s)
|
|
|
+ - mkdir -p ~/.ssh
|
|
|
+ - chmod 700 ~/.ssh
|
|
|
+ - echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config
|
|
|
+ - ssh-add <(echo "$SSH_PRIVATE_KEY")
|
|
|
+ - git config --global user.email "exploitation@opentalent.fr"
|
|
|
+ - git config --global user.name "git"
|
|
|
+
|
|
|
+ # install yarn
|
|
|
+ - curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
|
|
|
+ - echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list
|
|
|
+
|
|
|
+cache:
|
|
|
+ paths:
|
|
|
+ - ./node_modules
|
|
|
+
|
|
|
+unit:
|
|
|
+ stage: test
|
|
|
+
|
|
|
+ script:
|
|
|
+ - yarn install
|
|
|
+ - yarn test
|
|
|
+
|
|
|
+ artifacts:
|
|
|
+ paths:
|
|
|
+ - ./coverage/
|
|
|
+ when: always
|
|
|
+ reports:
|
|
|
+ coverage_report:
|
|
|
+ coverage_format: cobertura
|
|
|
+ path: coverage/cobertura-coverage.xml
|