From 89aae4c9ca9d01757f72a8bf5531d10e67ddcd63 Mon Sep 17 00:00:00 2001 From: Stacky McStackface <95074132+stackable-bot@users.noreply.github.com> Date: Wed, 17 Jul 2024 14:21:03 +0200 Subject: [PATCH] Generated commit to update templated files based on rev 46e0e57 in stackabletech/operator-templating repo. (#599) Triggered by: Manual run triggered by: NickLarsenNZ with message [remove flake8 action, add pre-commit checks] --- .github/workflows/pr_pre-commit.yaml | 17 +++++++++++++++++ .github/workflows/pr_reviewdog.yaml | 11 ----------- .pre-commit-config.yaml | 6 ++++++ renovate.json | 2 +- scripts/run_tests.sh | 2 +- 5 files changed, 25 insertions(+), 13 deletions(-) create mode 100644 .github/workflows/pr_pre-commit.yaml diff --git a/.github/workflows/pr_pre-commit.yaml b/.github/workflows/pr_pre-commit.yaml new file mode 100644 index 00000000..c4be523c --- /dev/null +++ b/.github/workflows/pr_pre-commit.yaml @@ -0,0 +1,17 @@ +--- +name: pre-commit + +on: + pull_request: + +jobs: + pre-commit: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 + - uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0 + with: + python-version: '3.12' + - uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd # v3.0.1 + with: + extra_args: "" # Disable --all-files until we have time to fix druid/stackable/bin/run-druid diff --git a/.github/workflows/pr_reviewdog.yaml b/.github/workflows/pr_reviewdog.yaml index 1081ab18..9b51e37a 100644 --- a/.github/workflows/pr_reviewdog.yaml +++ b/.github/workflows/pr_reviewdog.yaml @@ -23,17 +23,6 @@ jobs: with: github_token: ${{ secrets.GITHUB_TOKEN }} - flake8: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - - uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # tag=v5.1.0 - with: - python-version: "3.12" - - uses: reviewdog/action-flake8@99c2cfecdbc9111ec223b85b08af0e13a9a098dc # v3.10.0 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - hadolint: runs-on: ubuntu-latest steps: diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index fc52721b..9ededdf9 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -33,6 +33,12 @@ repos: types: [text] files: \.md(\.j2)*$ + - repo: https://github.com/koalaman/shellcheck-precommit + rev: v0.10.0 + hooks: + - id: shellcheck + args: ["--severity=info"] + # WARNING (@NickLarsenNZ): Nix users need to install ruff first. # If you do not, you will need to delete the cached ruff binary shown in the # error message diff --git a/renovate.json b/renovate.json index 613eef23..73ef3bff 100644 --- a/renovate.json +++ b/renovate.json @@ -3,5 +3,5 @@ "extends": [ "local>stackabletech/.github:renovate-config" ], - "ignorePaths": [".github/workflows/build.yml", ".github/workflows/general_daily_security.yml", ".github/workflows/pr_reviewdog.yaml"] + "ignorePaths": [".github/workflows/build.yml", ".github/workflows/general_daily_security.yml", ".github/workflows/pr_pre-commit.yaml", ".github/workflows/pr_reviewdog.yaml"] } diff --git a/scripts/run_tests.sh b/scripts/run_tests.sh index a80e0961..a31a1382 100755 --- a/scripts/run_tests.sh +++ b/scripts/run_tests.sh @@ -1,3 +1,3 @@ #!/usr/bin/env bash -./scripts/run-tests $@ +./scripts/run-tests "$@"