Add CI config
This commit is contained in:
parent
6aa251e9ec
commit
fc90b3fb71
1
TODO.md
1
TODO.md
|
@ -1,5 +1,4 @@
|
||||||
# TODO:
|
# TODO:
|
||||||
|
|
||||||
- add CI
|
|
||||||
- add flake
|
- add flake
|
||||||
- use bool value for `generate_gitea_project` when the feature is available
|
- use bool value for `generate_gitea_project` when the feature is available
|
||||||
|
|
|
@ -1,4 +1,17 @@
|
||||||
import subprocess
|
import subprocess
|
||||||
|
import os
|
||||||
|
|
||||||
|
REMOVE_PATHS = [
|
||||||
|
{% if cookiecutter.open_source_license == "Proprietary" %} "LICENSE", {% endif %}
|
||||||
|
{% if cookiecutter.configure_ci == "False" %} ".woodpecker.yml", {% endif %}
|
||||||
|
]
|
||||||
|
|
||||||
|
for path in REMOVE_PATHS:
|
||||||
|
if path and os.path.exists(path):
|
||||||
|
if os.path.isdir(path):
|
||||||
|
os.rmdir(path)
|
||||||
|
else:
|
||||||
|
os.unlink(path)
|
||||||
|
|
||||||
subprocess.call(["git", "init"])
|
subprocess.call(["git", "init"])
|
||||||
subprocess.call(["git", "checkout", "-b", "main"])
|
subprocess.call(["git", "checkout", "-b", "main"])
|
||||||
|
|
|
@ -1,5 +1,14 @@
|
||||||
pipeline:
|
pipeline:
|
||||||
a-test-step:
|
test:
|
||||||
image: debian
|
image: python:${PYTHON_VERSION}
|
||||||
|
pull: true
|
||||||
|
environment:
|
||||||
|
- POETRY_VIRTUALENVS_IN_PROJECT=true
|
||||||
commands:
|
commands:
|
||||||
- echo "Testing.."
|
- pip install poetry
|
||||||
|
- poetry install
|
||||||
|
- poetry run pytest
|
||||||
|
|
||||||
|
matrix:
|
||||||
|
PYTHON_VERSION:
|
||||||
|
- {{ cookiecutter. python_min_version}}
|
||||||
|
|
Loading…
Reference in a new issue