diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000000000000000000000000000000000000..06c0724df12ddfa546067d58fe31bb35160b7f74 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,38 @@ +image: node:8 + +# Set up MySQL test-database +services: + - mysql:5.5 + +# Configure test-database +variables: + MYSQL_DATABASE: supertestdb + MYSQL_ROOT_PASSWORD: secret + +# Install node libraries +before_script: + - npm install + +# Run JEST tests +run_tests: + stage: test + script: + - npm test + artifacts: + paths: + - coverage/ + +# Publish coverage report on gitlab-pages +pages: + stage: deploy + dependencies: + - run_tests + script: + - mkdir .public + - cp -r coverage/* .public + - mv .public public + artifacts: + paths: + - public + only: + - master