Add linting pipeline. Add status badge
This commit is contained in:
parent
8549ee00c6
commit
aff5a109cf
@ -1,10 +1,14 @@
|
|||||||
pipeline:
|
pipeline:
|
||||||
build:
|
build:
|
||||||
image: python:3.10
|
image: python:latest
|
||||||
commands:
|
commands:
|
||||||
- pip install -U build
|
- python --version
|
||||||
- build --version
|
- pip install -U virtualenv --quiet
|
||||||
|
- virtualenv venv
|
||||||
|
- source venv/bin/activate
|
||||||
|
- pip install -U build --quiet
|
||||||
- build
|
- build
|
||||||
when:
|
|
||||||
event: tag
|
when:
|
||||||
branch: [main, master]
|
event: tag
|
||||||
|
branch: [main, master]
|
||||||
|
@ -1,9 +1,12 @@
|
|||||||
pipeline:
|
pipeline:
|
||||||
deploy:
|
deploy:
|
||||||
image: python:3.10
|
image: python:latest
|
||||||
commands:
|
commands:
|
||||||
- pip install -U twine
|
- python --version
|
||||||
- twine --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/*
|
- twine upload --skip-existing --repository testpypi -u $TWINE_USERNAME -p $TWINE_PASSWORD dist/*
|
||||||
|
|
||||||
depends_on:
|
depends_on:
|
||||||
|
23
.woodpecker/linting.yml
Normal file
23
.woodpecker/linting.yml
Normal 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
|
@ -1 +1,3 @@
|
|||||||
# Woodpecker Python Test
|
# Woodpecker Python Test
|
||||||
|
|
||||||
|
![Status badge](https://woodpecker.exu.li/api/badges/woodpecker-test/python/status.svg)
|
||||||
|
@ -28,8 +28,8 @@ dependencies = [
|
|||||||
|
|
||||||
[tool.hatch.build]
|
[tool.hatch.build]
|
||||||
include = [
|
include = [
|
||||||
"woodpecker/*.py",
|
"woodpeckerpy/*.py",
|
||||||
"woodpecker/py.typed"
|
"woodpeckerpy/py.typed"
|
||||||
]
|
]
|
||||||
exclude = []
|
exclude = []
|
||||||
|
|
||||||
|
4
run.py
4
run.py
@ -1,5 +1,5 @@
|
|||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
import woodpecker
|
import woodpeckerpy
|
||||||
|
|
||||||
woodpecker.main()
|
woodpeckerpy.main()
|
||||||
|
Loading…
Reference in New Issue
Block a user