Add linting pipeline. Add status badge
This commit is contained in:
parent
8549ee00c6
commit
aff5a109cf
@ -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:
|
||||
|
||||
when:
|
||||
event: tag
|
||||
branch: [main, master]
|
||||
|
@ -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
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
|
||||
|
||||
![Status badge](https://woodpecker.exu.li/api/badges/woodpecker-test/python/status.svg)
|
||||
|
@ -28,8 +28,8 @@ dependencies = [
|
||||
|
||||
[tool.hatch.build]
|
||||
include = [
|
||||
"woodpecker/*.py",
|
||||
"woodpecker/py.typed"
|
||||
"woodpeckerpy/*.py",
|
||||
"woodpeckerpy/py.typed"
|
||||
]
|
||||
exclude = []
|
||||
|
||||
|
4
run.py
4
run.py
@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import woodpecker
|
||||
import woodpeckerpy
|
||||
|
||||
woodpecker.main()
|
||||
woodpeckerpy.main()
|
||||
|
Loading…
Reference in New Issue
Block a user