Commit 5b508baf authored by Adrian DC's avatar Adrian DC
Browse files

chore(pre-commit): fail 'gcil' jobs if 'PRE_COMMIT' is defined

Signed-off-by: default avatarAdrian DC <radian.dc@gmail.com>
parent 5dc3e17f
Loading
Loading
Loading
Loading
+1 −1
Changes for .gitlab-ci.yml: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -170,7 +170,7 @@ codestyle:
    - yapf -i ./src/*.py ./src/*/*.py ./setup.py
    - echo '' && git diff --name-status
    - |
      if [ -z "${CI_LOCAL:-}" ]; then
      if [ -z "${CI_LOCAL:-}" ] || [ ! -z "${PRE_COMMIT}" ]; then
        git diff --quiet
      fi
  rules:
+3 −3
Changes for .pre-commit-config.yaml: 3 added lines, 3 removed lines.
Original line number Diff line number Diff line
@@ -82,7 +82,7 @@ repos:
        description: Automatically run GitLab CI job with gcil (codestyle)
        stages:
          - pre-push
        entry: gcil
        entry: gcil -e 'PRE_COMMIT'
        args: ['codestyle']
        language: system
      - id: local-gcil-lint
@@ -90,7 +90,7 @@ repos:
        description: Automatically run GitLab CI job with gcil (lint)
        stages:
          - pre-push
        entry: gcil
        entry: gcil -e 'PRE_COMMIT'
        args: ['lint']
        language: system
      - id: local-gcil-typings
@@ -98,6 +98,6 @@ repos:
        description: Automatically run GitLab CI job with gcil (typings)
        stages:
          - pre-push
        entry: gcil
        entry: gcil -e 'PRE_COMMIT'
        args: ['typings']
        language: system