From 61efcfa697b62735ea8affef205e85209761e7d9 Mon Sep 17 00:00:00 2001 From: Jef Roosens Date: Tue, 18 May 2021 09:04:41 +0200 Subject: [PATCH] Added CICD config --- .woodpecker.yml | 17 +++++++++++++++++ Makefile | 9 ++++++--- 2 files changed, 23 insertions(+), 3 deletions(-) create mode 100644 .woodpecker.yml diff --git a/.woodpecker.yml b/.woodpecker.yml new file mode 100644 index 0000000..dd78ca4 --- /dev/null +++ b/.woodpecker.yml @@ -0,0 +1,17 @@ +matrix: + PYTHON_VERSION: + - 3.8 + - 3.9 + +pipeline: + test: + # Alpine version doesn't have make + image: python:${PYTHON_VERSION} + pull: true + commands: + - make test + + lint: + image: python:${PYTHON_VERSION} + commands: + - make lint diff --git a/Makefile b/Makefile index 92452b4..18e7628 100644 --- a/Makefile +++ b/Makefile @@ -24,18 +24,21 @@ venv: $(VENV)/bin/activate ## Formatting & linting +### Format the codebase using black format: venv - '$(VENV)'/bin/black setup.py app + @ '$(VENV)'/bin/black setup.py app .PHONY: format +### Lint using black & flake8 lint: venv - '$(VENV)'/bin/flake8 setup.py app + @ '$(VENV)'/bin/flake8 setup.py app + @ '$(VENV)'/bin/black --check setup.py app .PHONY: lint ## Testing test: venv - '$(VENV)'/bin/pytest --cov=app --cov-fail-under='$(MIN_COV)' tests/ + @ '$(VENV)'/bin/pytest --cov=app --cov-fail-under='$(MIN_COV)' tests/ .PHONY: test