Add linting pipeline. Add status badge
Some checks failed
ci/woodpecker/push/build Pipeline failed
ci/woodpecker/push/deploy unknown status
ci/woodpecker/push/linting Pipeline failed

This commit is contained in:
RealStickman 2022-09-12 17:31:22 +02:00
parent 8549ee00c6
commit aff5a109cf
11 changed files with 45 additions and 13 deletions

View File

@ -1,10 +1,14 @@
pipeline:
build:
image: python:3.10
image: python:latest
commands:
- pip install -U build
- build --version
- python --version
- pip install -U virtualenv --quiet
- virtualenv venv
- source venv/bin/activate
- pip install -U build --quiet
- build
when:
event: tag
branch: [main, master]
when:
event: tag
branch: [main, master]

View File

@ -1,9 +1,12 @@
pipeline:
deploy:
image: python:3.10
image: python:latest
commands:
- pip install -U twine
- twine --version
- python --version
- pip install -U virtualenv --quiet
- virtualenv venv
- source venv/bin/activate
- pip install -U twine --quiet
- twine upload --skip-existing --repository testpypi -u $TWINE_USERNAME -p $TWINE_PASSWORD dist/*
depends_on:

23
.woodpecker/linting.yml Normal file
View File

@ -0,0 +1,23 @@
# https://woodpecker-ci.org/docs/usage/pipeline-syntax
pipeline:
typecheck:
image: python:latest
group: linting
commands:
- python --version
- pip install -U virtualenv --quiet
- virtualenv venv
- source venv/bin/activate
- pip install -U pyright --quiet
- pyright woodpeckerpy/main.py
format:
image: python:latest
group: linting
commands:
- python --version
- pip install -U virtualenv --quiet
- virtualenv venv
- source venv/bin/activate
- pip install -U black --quiet
- black woodpeckerpy/main.py

View File

@ -1 +1,3 @@
# Woodpecker Python Test
![Status badge](https://woodpecker.exu.li/api/badges/woodpecker-test/python/status.svg)

View File

@ -28,8 +28,8 @@ dependencies = [
[tool.hatch.build]
include = [
"woodpecker/*.py",
"woodpecker/py.typed"
"woodpeckerpy/*.py",
"woodpeckerpy/py.typed"
]
exclude = []

4
run.py
View File

@ -1,5 +1,5 @@
#!/usr/bin/env python3
import woodpecker
import woodpeckerpy
woodpecker.main()
woodpeckerpy.main()