diff options
| author | Philip Chimento <philip@endlessm.com> | 2019-09-19 17:32:32 -0700 |
|---|---|---|
| committer | Philip Chimento <philip@endlessm.com> | 2019-09-19 17:37:05 -0700 |
| commit | bfb7de0d381fa774d158e05960e3d57cb72b87f3 (patch) | |
| tree | 5873e582164a74fdeeee7117f3c4d1142b855286 | |
| parent | b7e84f47eeeb1299fa7696527e00f6ca9c751e61 (diff) | |
| download | gjs-bfb7de0d381fa774d158e05960e3d57cb72b87f3.tar.gz | |
CI: Skip linter jobs if no linted files modified
This uses GitLab's changes expressions to skip the linter jobs if no
files were modified in the code being pushed that would be linted by
that job.
So we only run cpplint and cppcheck for changes to .c, .h, and .cpp
files, and we only run eslint for changes to .js files.
| -rw-r--r-- | .gitlab-ci.yml | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b0c4ea64..1f1d068a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -194,6 +194,11 @@ cppcheck: - tags variables: - $CI_COMMIT_MESSAGE =~ /\[skip cppcheck\]/ + only: + changes: + - '**/*.c' + - '**/*.cpp' + - '**/*.h' cpplint: <<: *build @@ -208,6 +213,11 @@ cpplint: - tags variables: - $CI_COMMIT_MESSAGE =~ /\[skip cpplint\]/ + only: + changes: + - '**/*.c' + - '**/*.cpp' + - '**/*.h' eslint: when: on_success @@ -221,6 +231,9 @@ eslint: - tags variables: - $CI_COMMIT_MESSAGE =~ /\[skip eslint\]/ + only: + changes: + - '**/*.js' ############################################# # Manual Jobs # |
