diff --git a/.woodpecker/build.yml b/.woodpecker/build.yml index 1a80fa4..f01c5f0 100644 --- a/.woodpecker/build.yml +++ b/.woodpecker/build.yml @@ -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] diff --git a/.woodpecker/deploy.yml b/.woodpecker/deploy.yml index c37ceee..48534d7 100644 --- a/.woodpecker/deploy.yml +++ b/.woodpecker/deploy.yml @@ -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: diff --git a/.woodpecker/linting.yml b/.woodpecker/linting.yml new file mode 100644 index 0000000..4f3f9ab --- /dev/null +++ b/.woodpecker/linting.yml @@ -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 diff --git a/README.md b/README.md index 27b0da6..68d8984 100644 --- a/README.md +++ b/README.md @@ -1 +1,3 @@ # Woodpecker Python Test + +![Status badge](https://woodpecker.exu.li/api/badges/woodpecker-test/python/status.svg) diff --git a/pyproject.toml b/pyproject.toml index 6a29aab..b8387ce 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -28,8 +28,8 @@ dependencies = [ [tool.hatch.build] include = [ - "woodpecker/*.py", - "woodpecker/py.typed" + "woodpeckerpy/*.py", + "woodpeckerpy/py.typed" ] exclude = [] diff --git a/run.py b/run.py index 404ed0b..290e24b 100755 --- a/run.py +++ b/run.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -import woodpecker +import woodpeckerpy -woodpecker.main() +woodpeckerpy.main() diff --git a/woodpecker/__init__.py b/woodpeckerpy/__init__.py similarity index 100% rename from woodpecker/__init__.py rename to woodpeckerpy/__init__.py diff --git a/woodpecker/__pycache__/__init__.cpython-310.pyc b/woodpeckerpy/__pycache__/__init__.cpython-310.pyc similarity index 100% rename from woodpecker/__pycache__/__init__.cpython-310.pyc rename to woodpeckerpy/__pycache__/__init__.cpython-310.pyc diff --git a/woodpecker/__pycache__/main.cpython-310.pyc b/woodpeckerpy/__pycache__/main.cpython-310.pyc similarity index 100% rename from woodpecker/__pycache__/main.cpython-310.pyc rename to woodpeckerpy/__pycache__/main.cpython-310.pyc diff --git a/woodpecker/main.py b/woodpeckerpy/main.py similarity index 100% rename from woodpecker/main.py rename to woodpeckerpy/main.py diff --git a/woodpecker/py.typed b/woodpeckerpy/py.typed similarity index 100% rename from woodpecker/py.typed rename to woodpeckerpy/py.typed