diff options
| author | jvoisin | 2023-02-20 20:00:14 +0100 |
|---|---|---|
| committer | jvoisin | 2023-02-20 21:15:07 +0100 |
| commit | a63011b3f62d8de15cb27c0af0ccd46edbd2cfc4 (patch) | |
| tree | 2adea1728d3eead90b630f1089b71b3fdf24993a /.gitlab-ci.yml | |
| parent | e41390eb64eaf72fd1b9914221eaf22801812521 (diff) | |
Improve the CI
- Remove some useless linters
- Make use of ruff
Diffstat (limited to '.gitlab-ci.yml')
| -rw-r--r-- | .gitlab-ci.yml | 29 |
1 files changed, 7 insertions, 22 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 098e3cb..310cbbe 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml | |||
| @@ -1,6 +1,3 @@ | |||
| 1 | include: | ||
| 2 | - template: Security/SAST.gitlab-ci.yml | ||
| 3 | |||
| 4 | variables: | 1 | variables: |
| 5 | CONTAINER_REGISTRY: $CI_REGISTRY/georg/mat2-ci-images | 2 | CONTAINER_REGISTRY: $CI_REGISTRY/georg/mat2-ci-images |
| 6 | 3 | ||
| @@ -12,28 +9,16 @@ stages: | |||
| 12 | before_script: # This is needed to not run the testsuite as root | 9 | before_script: # This is needed to not run the testsuite as root |
| 13 | - useradd --home-dir ${CI_PROJECT_DIR} mat2 | 10 | - useradd --home-dir ${CI_PROJECT_DIR} mat2 |
| 14 | - chown -R mat2 . | 11 | - chown -R mat2 . |
| 15 | |||
| 16 | linting:bandit: | ||
| 17 | image: $CONTAINER_REGISTRY:linting | ||
| 18 | stage: linting | ||
| 19 | script: # TODO: remove B405 and B314 | ||
| 20 | - bandit ./mat2 --format txt --skip B101 | ||
| 21 | - bandit -r ./libmat2 --format txt --skip B101,B404,B603,B405,B314,B108,B311 | ||
| 22 | |||
| 23 | linting:codespell: | ||
| 24 | image: $CONTAINER_REGISTRY:linting | ||
| 25 | stage: linting | ||
| 26 | script: | ||
| 27 | # Run codespell to check for spelling errors; ignore errors about binary | ||
| 28 | # files, use a config with ignored words and exclude the git directory, | ||
| 29 | # which might contain false positives | ||
| 30 | - codespell -q 2 -I utils/ci/codespell/ignored_words.txt -S .git | ||
| 31 | 12 | ||
| 32 | linting:pylint: | 13 | linting:ruff: |
| 33 | image: $CONTAINER_REGISTRY:linting | ||
| 34 | stage: linting | 14 | stage: linting |
| 35 | script: | 15 | script: |
| 36 | - pylint --disable=no-else-return,no-else-raise,no-else-continue,unnecessary-comprehension,raise-missing-from,unsubscriptable-object,use-dict-literal,unspecified-encoding,consider-using-f-string,use-list-literal,too-many-statements --extension-pkg-whitelist=cairo,gi ./libmat2 ./mat2 | 16 | - apt update |
| 17 | - apt install -qqy --no-install-recommends python3-venv | ||
| 18 | - python3 -m venv venv | ||
| 19 | - source venv/bin/activate | ||
| 20 | - pip3 install ruff | ||
| 21 | - ruff check . | ||
| 37 | 22 | ||
| 38 | linting:mypy: | 23 | linting:mypy: |
| 39 | image: $CONTAINER_REGISTRY:linting | 24 | image: $CONTAINER_REGISTRY:linting |
