Skip to content

Commit

Permalink
First import
Browse files Browse the repository at this point in the history
  • Loading branch information
melmorabity committed Jul 30, 2023
0 parents commit c482843
Show file tree
Hide file tree
Showing 29 changed files with 2,511 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/acceptance_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
name: Acceptance tests
on:
push:
branches:
- main
tags-ignore:
- '**'
pull_request:
jobs:
acceptance-tests:
name: Acceptance tests (Python ${{ matrix.python_version }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python_version:
- '3.8'
- '3.9'
- '3.10'
- '3.11'
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Python ${{ matrix.python_version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python_version }}
- name: Install Tox
run: pip install tox
- name: Run acceptance tests
run: tox -e py${{ matrix.python_version }} -e acceptance
23 changes: 23 additions & 0 deletions .github/workflows/linting.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
name: Linting
on:
push:
branches:
- main
tags-ignore:
- '**'
pull_request:
jobs:
linting:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Python
uses: actions/setup-python@v4
with:
python-version: 3.11
- name: Install dependencies
run: pip install -e .[dev]
- name: Run pre-commit
uses: pre-commit/action@v3.0.0
38 changes: 38 additions & 0 deletions .github/workflows/unit_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
name: Unit tests
on:
push:
branches:
- main
tags-ignore:
- '**'
pull_request:
jobs:
unit-tests:
name: Unit tests (Python ${{ matrix.python_version }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python_version:
- '3.8'
- '3.9'
- '3.10'
- '3.11'
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Python ${{ matrix.python_version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python_version }}
- name: Install Tox
run: pip install tox
- name: Run unit tests
run: tox -e py${{ matrix.python_version }}
- if: matrix.python_version == '3.11'
name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
with:
files: coverage.xml
fail_ci_if_error: true
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
*.egg-info
.*_cache
.coverage
.tox
.venv
__pycache__
build
coverage.xml
dist
105 changes: 105 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
---
repos:
- repo: meta
hooks:
- id: check-hooks-apply
- id: check-useless-excludes
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: check-added-large-files
- id: check-ast
- id: check-docstring-first
- id: check-executables-have-shebangs
- id: check-merge-conflict
- id: check-shebang-scripts-are-executable
- id: check-toml
- id: check-yaml
- id: end-of-file-fixer
- id: file-contents-sorter
files: ^\.gitignore$
- id: mixed-line-ending
args:
- --fix=lf
- id: trailing-whitespace
- repo: https://github.com/ComPWA/mirrors-taplo
rev: v0.8.1
hooks:
- id: taplo
args:
- format
- --option=reorder_arrays=true
- --option=reorder_keys=true
- repo: https://github.com/psf/black
rev: 23.7.0
hooks:
- id: black
- repo: https://github.com/PyCQA/isort
rev: 5.12.0
hooks:
- id: isort
- repo: https://github.com/PyCQA/flake8
rev: 6.1.0
hooks:
- id: flake8
additional_dependencies:
- Flake8-pyproject
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.0.280
hooks:
- id: ruff
- repo: https://github.com/PyCQA/bandit
rev: 1.7.5
hooks:
- id: bandit
args:
- -c
- pyproject.toml
additional_dependencies:
- .[toml]
- repo: https://github.com/pycqa/pydocstyle
rev: 6.3.0
hooks:
- id: pydocstyle
additional_dependencies:
- .[toml]
- repo: https://github.com/scop/pre-commit-shfmt
rev: v3.7.0-1
hooks:
- id: shfmt
args:
- --indent=4
- --binary-next-line
- --case-indent
- --simplify
- --write
- repo: https://github.com/shellcheck-py/shellcheck-py
rev: v0.9.0.5
hooks:
- id: shellcheck
- repo: https://github.com/AleksaC/hadolint-py
rev: v2.12.0.2
hooks:
- id: hadolint
- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.35.0
hooks:
- id: markdownlint
args:
- --disable=MD013
- repo: local
hooks:
- id: pylint
name: Pylint
entry: pylint
args:
- --enable-all-extensions
language: system
types:
- python
- id: mypy
name: Mypy
entry: mypy
language: system
types:
- python
8 changes: 8 additions & 0 deletions .pre-commit-hooks.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
- id: jenkinsfilelint
name: jenkinsfilelint
description: Jenkins declarative pipeline linter
entry: jenkinsfilelint
language: python
files: (?i)(^|/)Jenkinsfile[^/]*$
require_serial: true
Loading

0 comments on commit c482843

Please sign in to comment.