From a23333432c90e46f16ade8c590b6e72a3c49428c Mon Sep 17 00:00:00 2001 From: NimVek Date: Sat, 27 Jan 2024 23:57:07 +0100 Subject: [PATCH] add Continious Integration --- .github/ISSUE_TEMPLATE/BUG_REPORT.md | 36 +++++++++++++++++++ .github/ISSUE_TEMPLATE/FEATURE_REQUEST.md | 25 +++++++++++++ .github/ISSUE_TEMPLATE/config.yml | 2 ++ .github/PULL_REQUEST_TEMPLATE.md | 17 +++++++++ .github/dependabot.yml | 12 +++++++ .github/workflows/ci.yml | 43 +++++++++++++++++++++++ .pre-commit-config.yaml | 25 +++++++++++++ 7 files changed, 160 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/BUG_REPORT.md create mode 100644 .github/ISSUE_TEMPLATE/FEATURE_REQUEST.md create mode 100644 .github/ISSUE_TEMPLATE/config.yml create mode 100644 .github/PULL_REQUEST_TEMPLATE.md create mode 100644 .github/dependabot.yml create mode 100644 .github/workflows/ci.yml create mode 100644 .pre-commit-config.yaml diff --git a/.github/ISSUE_TEMPLATE/BUG_REPORT.md b/.github/ISSUE_TEMPLATE/BUG_REPORT.md new file mode 100644 index 0000000..6fd5ac1 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/BUG_REPORT.md @@ -0,0 +1,36 @@ +--- +name: Bug report +about: Create a report to help us improve +title: '' +labels: bug +assignees: NimVek + +--- + +## Describe the bug + +A clear and concise description of what the bug is. + +## To Reproduce + +Steps to reproduce the behavior: + +1. Go to '...' +1. Input '....' +1. See error + +## Expected behavior + +A clear and concise description of what you expected to happen. + +## Logs & Screenshots + +If applicable, add logs or screenshots to help explain your problem. + +## Environment + +- checkmk version: [e.g. 2.2.0p20] + +## Additional context + +Add any other context about the problem here. diff --git a/.github/ISSUE_TEMPLATE/FEATURE_REQUEST.md b/.github/ISSUE_TEMPLATE/FEATURE_REQUEST.md new file mode 100644 index 0000000..535e80e --- /dev/null +++ b/.github/ISSUE_TEMPLATE/FEATURE_REQUEST.md @@ -0,0 +1,25 @@ +--- +name: Feature request +about: Suggest an idea for this project +title: '' +labels: enhancement +assignees: NimVek + +--- + +## Is your feature request related to a problem? Please describe. + +A clear and concise description of what the problem is. +Ex. I'm always frustrated when [...] + +## Describe the solution you'd like + +A clear and concise description of what you want to happen. + +## Describe alternatives you've considered + +A clear and concise description of any alternative solutions or features you've considered. + +## Additional context + +Add any other context or screenshots about the feature request here. diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 0000000..bd9dfe4 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,2 @@ +--- +blank_issues_enabled: false diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..6a129c7 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,17 @@ +## Remove this section + +Please have a look at +[our contribution documentation](https://github.com/NimVek/checkmk-packages/blob/main/.github/CONTRIBUTING.md) +before submitting your Pull Request. + +Please note that the issue of this process apply to *all* pull requests, no +matter how small; if you don't do them, it's likely that nobody will even +notice your PR needs a review. + +## Contributor Checklist: + +- [ ] The associated issue is here: + # +- [ ] The changes pass minimal style checks (use: `pre-commit run --all-files` ) +- [ ] I have updated the automated tests. diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..ec5219e --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,12 @@ +--- +# To get started with Dependabot version updates, you'll need to specify which +# package ecosystems to update and where the package manifests are located. +# Please see the documentation for all configuration options: +# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates + +version: 2 +updates: + - package-ecosystem: github-actions + directory: / + schedule: + interval: daily diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..f6ef2eb --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,43 @@ +--- +name: Continuous Integration + +on : + push: + branches: [main] + pull_request: + branches: [main] + workflow_dispatch: + +jobs: + lint: + strategy: + matrix: + os: [ubuntu-latest] + include: + - os: ubuntu-latest + CACHE_PRE_COMMIT: ~/.cache/pre-commit + + name: Lint + runs-on: ${{ matrix.os }} + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Caching + uses: actions/cache@v4 + with: + path: | + ${{ matrix.CACHE_PRE_COMMIT }} + key: lint-${{ runner.os }}-${{ hashFiles('**/.pre-commit-config.yaml') + }} + restore-keys: | + lint-${{ runner.os }}- + + - name: Install pre-commit & dependencies + run: | + sudo apt-get install -y pre-commit shellcheck + + - name: Lint + run: | + pre-commit run --all-files diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..108adfe --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,25 @@ +--- +# 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.5.0 + hooks: + - id: trailing-whitespace + - id: end-of-file-fixer + - id: check-json + - id: check-yaml + - id: check-merge-conflict + - id: check-case-conflict + - id: check-added-large-files + - id: check-shebang-scripts-are-executable + - id: pretty-format-json + - repo: https://github.com/syntaqx/git-hooks + rev: v0.0.18 + hooks: + - id: shellcheck + - repo: https://github.com/jumanjihouse/pre-commit-hook-yamlfmt + rev: 0.2.3 + hooks: + - id: yamlfmt + args: [--mapping, '2', --sequence, '4', --offset, '2', --colons, --width, '88']