Skip to content
Snippets Groups Projects
Commit 15ec09af authored by nimrod's avatar nimrod
Browse files

Some automated testing.

- pre-commit config.
- CI pipeline to build the package, validate with twine, install it and
  check the executable script.
- Add a badge to the README.
parent fed6214c
No related branches found
No related tags found
No related merge requests found
---
include:
- project: shore/ci-stuff
file: templates/pre-commit.yml
- project: shore/ci-stuff
file: templates/python.yml
variables:
SKIP_PYPI_UPLOAD: 1
install wheel:
extends: .install-wheel
script:
- sampleproject
---
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks.git
rev: v4.0.1
hooks:
- id: check-merge-conflict
- id: check-toml
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace
exclude: \.diff$
- repo: https://github.com/codespell-project/codespell.git
rev: v2.1.0
hooks:
- id: codespell
- repo: https://github.com/amperser/proselint.git
rev: 0.10.2
hooks:
- id: proselint
types: [plain-text]
exclude: LICENSE
- repo: https://gitlab.com/devopshq/gitlab-ci-linter.git
rev: v1.0.2
hooks:
- id: gitlab-ci-linter
args:
- "--server"
- https://git.shore.co.il
- repo: https://git.shore.co.il/nimrod/yamltool.git
rev: v0.1.2
hooks:
- id: yamltool
- repo: https://github.com/adrienverge/yamllint.git
rev: v1.26.3
hooks:
- id: yamllint
- repo: https://github.com/Lucas-C/pre-commit-hooks-markup.git
rev: v1.0.1
hooks:
- id: rst-linter
- repo: https://github.com/myint/rstcheck.git
rev: master
hooks:
- id: rstcheck
- repo: https://github.com/ambv/black.git
rev: 22.3.0
hooks:
- id: black
args:
- |
--line-length=79
Sample Python project
#####################
.. image:: https://git.shore.co.il/nimrod/samplepyproject/badges/main/pipeline.svg
:target: https://git.shore.co.il/nimrod/samplepyproject/-/commits/main
:alt: pipeline status
A sample Python project. Meant as an instruction on creating a modern Python
package with just the standard Python tooling (setuptools, wheel) and without
additional tools like `Poetry <https://python-poetry.org/>`_, `Flit
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment