From 554bc44fd424dd4f0490cd36713df94ac35fbbcb Mon Sep 17 00:00:00 2001 From: Samuel Jones Date: Thu, 11 Aug 2022 09:03:46 +0100 Subject: [PATCH] Add pre-commit config --- .pre-commit-config.yaml | 21 +++++++++++++++++++++ build/action.yml | 4 ++-- 2 files changed, 23 insertions(+), 2 deletions(-) create mode 100644 .pre-commit-config.yaml diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..d9afeae --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,21 @@ +# See https://pre-commit.com for more information +# See https://pre-commit.com/hooks.html for more hooks +repos: + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v4.3.0 + hooks: + - id: check-added-large-files + - id: check-byte-order-marker + - id: check-case-conflict + - id: check-merge-conflict + - id: check-symlinks + - id: detect-private-key + - id: end-of-file-fixer + - id: trailing-whitespace + args: [--markdown-linebreak-ext=md] + + - repo: https://github.com/python-jsonschema/check-jsonschema + rev: 0.17.1 + hooks: + - id: check-github-actions + - id: check-github-workflows diff --git a/build/action.yml b/build/action.yml index b02c170..f0e028d 100644 --- a/build/action.yml +++ b/build/action.yml @@ -24,8 +24,8 @@ runs: - name: Run Kafka Broker run: | - [ "true" = "${{ inputs.run_kafka }}" ] && - docker run -d --pull=always --name=redpanda-1 --rm -p 9092:9092 -p 9644:9644 docker.vectorized.io/vectorized/redpanda redpanda start --overprovisioned --smp 1 --memory 1G --reserve-memory 0M --node-id 0 --check=false + [ "true" = "${{ inputs.run_kafka }}" ] && + docker run -d --pull=always --name=redpanda-1 --rm -p 9092:9092 -p 9644:9644 docker.vectorized.io/vectorized/redpanda redpanda start --overprovisioned --smp 1 --memory 1G --reserve-memory 0M --node-id 0 --check=false sleep 3 docker exec redpanda-1 rpk topic create data_ready --brokers=localhost:9092 || echo "Skipping starting ActiveMQ" shell: bash