Skip to content

Commit

Permalink
Enable GitLab testing (mattermost#7180)
Browse files Browse the repository at this point in the history
* Enable GitLab testing

Co-authored-by: Mattermod <[email protected]>
  • Loading branch information
metanerd and mattermod authored Jan 12, 2021
1 parent 3173fd9 commit ee4149c
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ stages:
- trigger

variables:
ONLY_BUILD: "yes"
ONLY_BUILD: "no"
ONLY_TEST: "no"

include:
Expand Down Expand Up @@ -43,28 +43,29 @@ prepare:
script:
- npm ci --cache .npm --prefer-offline && cd node_modules/mattermost-redux && npm i && npm run build && cd -
rules:
- if: '$ONLY_BUILD != "yes"'
- if: '$CI_COMMIT_REF_NAME == "master" && $ONLY_BUILD != "yes"'

lint:
extends: .check
script:
- npm run check
rules:
- if: '$ONLY_BUILD != "yes"'
- if: '$CI_COMMIT_REF_NAME == "master" && $ONLY_BUILD != "yes"'

test: #todo check on how to create junit.xml, there currently is none
extends: .check
script:
- npm run test-ci
timeout: 3 hours
rules:
- if: '$ONLY_BUILD != "yes"'
- if: '$CI_COMMIT_REF_NAME == "master" && $ONLY_BUILD != "yes"'

type-check:
extends: .check
script:
- npm run check-types
rules:
- if: '$ONLY_BUILD != "yes"'
- if: '$CI_COMMIT_REF_NAME == "master" && $ONLY_BUILD != "yes"'

i18n-check:
extends: .check
Expand All @@ -77,7 +78,8 @@ i18n-check:
- diff /tmp/en.json i18n/en.json
# Address weblate behavior which does not remove whole translation item when translation string is set to empty
- npm run mmjstool -- i18n clean-empty --webapp-dir . --mobile-dir /tmp/fake-mobile-dir --check
- npm run mmjstool -- i18n check-empty-src --webapp-dir . --mobile-dir /tmp/fake-mobile-dir

- rm -rf tmp
rules:
- if: '$ONLY_BUILD != "yes"'
- if: '$CI_COMMIT_REF_NAME == "master" && $ONLY_BUILD != "yes"'

0 comments on commit ee4149c

Please sign in to comment.