From 376d2344bac09e1e0c606f62b3559bae2f0c3287 Mon Sep 17 00:00:00 2001 From: Franklin D <2730246+devsecfranklin@users.noreply.github.com> Date: Sun, 30 Jun 2024 14:04:23 -0600 Subject: [PATCH] testing pre-commit hooks (#287) * testing pre-commit hooks * update continaer build --- .github/{workflows => }/trivy.yaml | 0 .github/workflows/container.yml | 18 ++++++++++++++++++ .pre-commit-config.yaml | 20 ++++++++++++++++++++ tests/requirements-test.txt | 3 ++- 4 files changed, 40 insertions(+), 1 deletion(-) rename .github/{workflows => }/trivy.yaml (100%) create mode 100644 .github/workflows/container.yml create mode 100644 .pre-commit-config.yaml diff --git a/.github/workflows/trivy.yaml b/.github/trivy.yaml similarity index 100% rename from .github/workflows/trivy.yaml rename to .github/trivy.yaml diff --git a/.github/workflows/container.yml b/.github/workflows/container.yml new file mode 100644 index 0000000..a5c0f9c --- /dev/null +++ b/.github/workflows/container.yml @@ -0,0 +1,18 @@ +name: build container +on: + push: + branches: + - main + pull_request: +jobs: + build: + name: build Debian bullseye container + runs-on: ubuntu-22.04 + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Build an image from Dockerfile + run: | + ./bootstrap.sh + ./configure + cd docker && make build diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..209394c --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,20 @@ +# 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.6.0 + hooks: + - id: trailing-whitespace + - id: end-of-file-fixer + - id: check-yaml + - id: check-added-large-files + - repo: https://github.com/econchick/interrogate + rev: 1.5.0 + hooks: + - id: interrogate + args: [--fail-under=80, --verbose] + - repo: https://github.com/pycqa/pydocstyle + rev: 6.1.1 + hooks: + - id: pydocstyle + args: [--ignore=D107,D204] diff --git a/tests/requirements-test.txt b/tests/requirements-test.txt index 65c144b..8dbff86 100644 --- a/tests/requirements-test.txt +++ b/tests/requirements-test.txt @@ -7,4 +7,5 @@ coverage==7.3.2 flake8==6.1.0 pylint==2.17.4 isort==5.12.0 -black \ No newline at end of file +black +pre-commit