Skip to content
Snippets Groups Projects
.gitlab-ci.yml 1.39 KiB
Newer Older
  - prettier
  - test
lint:commit:
  image: node:16.16.0-alpine
  stage: lint
  allow_failure: true
  before_script:
    - apk add --no-cache npm
    - npm ci
  script:
    - echo "${CI_COMMIT_MESSAGE}" | npx commitlint

linter:
  image: node:16.16.0-alpine
  stage: lint
  before_script:
    - apk add --no-cache npm
    - npm ci
  script:
    - npm run lint:ts
  only:
    - development
    - merge_requests
    - tags

prettier:
  image: node:16.16.0-alpine
  stage: prettier
  before_script:
    - apk add --no-cache npm
    - npm ci
  script:
    - npm run prettier:ci
  only:
    - development
    - merge_requests
    - tags

jest:
  image: node:16.16.0-alpine
  stage: test
    - apk add --no-cache npm
    - npm ci
    - npm run test:ci
  only:
Tadeusz Miesiąc's avatar
Tadeusz Miesiąc committed
    - development
    - merge_requests
    - tags
      coverage_report:
        coverage_format: cobertura
        path: coverage/cobertura-coverage.xml
Tadeusz Miesiąc's avatar
Tadeusz Miesiąc committed

deploy_staging:
  image: node:16.16.0
  stage: deploy
  only:
    - development
  script:
    - npm install --global vercel
    - vercel pull --yes --environment=production --token=$VERCEL_TOKEN
    - vercel build --prod --token=$VERCEL_TOKEN
    - vercel deploy --prebuilt --prod --token=$VERCEL_TOKEN