diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000000000000000000000000000000000000..60c66e20a98614223b51e479c78f7e2d5115c11b --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,29 @@ +image: node:14 + +stages: + - build + - test + +cache: + key: ${CI_COMMIT_REF_SLUG} + paths: + - .npm/ + +build-app-job: + stage: build + script: + - echo "Commit branch '$CI_COMMIT_BRANCH'" + - npm ci --cache .npm --prefer-offline + - echo "Success building" + rules: + - if: '$CI_COMMIT_BRANCH == "develop"' + - if: '$CI_COMMIT_BRANCH == "main"' + +test-run-job: + stage: test + script: + - echo "Run test starting" + - npm run test + rules: + - if: '$CI_COMMIT_BRANCH == "develop"' + - if: '$CI_COMMIT_BRANCH == "main"' \ No newline at end of file