diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 4ef3d2b..1fa142b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,5 +1,6 @@ stages: - test + - lint - build run_tests: @@ -15,6 +16,16 @@ run_tests: rules: - if: $CI_COMMIT_BRANCH == "main" +check_node_syntax: + stage: lint + image: node:20-alpine + before_script: + - npm ci + script: + - npm run type-check + rules: + - if: $CI_COMMIT_BRANCH == "main" + build_and_push: stage: build image: docker:24.0.7 @@ -42,6 +53,5 @@ build_and_push: - docker build -t "$CELERY_IMAGE_NAME" -f ./compose/prod/celery/Dockerfile --no-cache . - echo "Pushing Celery image ${CELERY_IMAGE_NAME}" - docker push "$CELERY_IMAGE_NAME" - rules: - - if: $CI_COMMIT_TAG - when: always + needs: + - run_tests