GitLab CI: only run jobs when relevant files change
This commit is contained in:
parent
9c181e30a5
commit
1b06ead6d2
1 changed files with 30 additions and 2 deletions
|
@ -22,14 +22,33 @@ before_script:
|
||||||
lint-js:
|
lint-js:
|
||||||
stage: lint
|
stage: lint
|
||||||
script: yarn test:lint:js
|
script: yarn test:lint:js
|
||||||
|
only:
|
||||||
|
changes:
|
||||||
|
- "**/*.js"
|
||||||
|
- ".eslintignore"
|
||||||
|
- ".eslintrc.js"
|
||||||
|
|
||||||
lint-sass:
|
lint-sass:
|
||||||
stage: lint
|
stage: lint
|
||||||
script: yarn test:lint:sass
|
script: yarn test:lint:sass
|
||||||
|
only:
|
||||||
|
changes:
|
||||||
|
- "**/*.scss"
|
||||||
|
- "**/*.css"
|
||||||
|
- ".stylelintrc.json"
|
||||||
|
|
||||||
jest:
|
jest:
|
||||||
stage: test
|
stage: test
|
||||||
script: yarn test:jest
|
script: yarn test:jest
|
||||||
|
only:
|
||||||
|
changes:
|
||||||
|
- "**/*.js"
|
||||||
|
- "**/*.json"
|
||||||
|
- "app/soapbox/**/*"
|
||||||
|
- "webpack/**/*"
|
||||||
|
- "jest.config.js"
|
||||||
|
- "package.json"
|
||||||
|
- "yarn.lock"
|
||||||
|
|
||||||
build-production:
|
build-production:
|
||||||
stage: build
|
stage: build
|
||||||
|
@ -39,6 +58,9 @@ build-production:
|
||||||
artifacts:
|
artifacts:
|
||||||
paths:
|
paths:
|
||||||
- static
|
- static
|
||||||
|
only:
|
||||||
|
changes:
|
||||||
|
- "!docs/**/*"
|
||||||
|
|
||||||
docs-deploy:
|
docs-deploy:
|
||||||
stage: deploy
|
stage: deploy
|
||||||
|
@ -48,7 +70,10 @@ docs-deploy:
|
||||||
script:
|
script:
|
||||||
- curl -X POST -F"token=$CI_JOB_TOKEN" -F'ref=master' https://gitlab.com/api/v4/projects/15685485/trigger/pipeline
|
- curl -X POST -F"token=$CI_JOB_TOKEN" -F'ref=master' https://gitlab.com/api/v4/projects/15685485/trigger/pipeline
|
||||||
only:
|
only:
|
||||||
- develop
|
refs:
|
||||||
|
- develop
|
||||||
|
changes:
|
||||||
|
- "docs/**/*"
|
||||||
|
|
||||||
# Supposed to fail when translations are outdated, instead always passes
|
# Supposed to fail when translations are outdated, instead always passes
|
||||||
#
|
#
|
||||||
|
@ -73,4 +98,7 @@ pages:
|
||||||
paths:
|
paths:
|
||||||
- public
|
- public
|
||||||
only:
|
only:
|
||||||
- develop
|
refs:
|
||||||
|
- develop
|
||||||
|
changes:
|
||||||
|
- "!docs/**/*"
|
||||||
|
|
Loading…
Reference in a new issue