python/{{ cookiecutter.project_slug }}/.woodpecker.yml

40 lines
1.3 KiB
YAML
Raw Normal View History

2023-05-19 17:16:55 +02:00
pipeline:
2023-05-19 19:35:18 +02:00
test:
2023-05-20 23:11:08 +02:00
group: test
2023-05-19 19:35:18 +02:00
image: python:${PYTHON_VERSION}
pull: true
environment:
- POETRY_VIRTUALENVS_IN_PROJECT=true
2023-05-19 17:16:55 +02:00
commands:
2023-05-19 19:35:18 +02:00
- pip install poetry
- poetry install
- poetry run pytest
2023-05-20 23:11:08 +02:00
nix:
group: test
image: nixos/nix:latest
pull: true
commands:
- nix build --experimental-features 'nix-command flakes'
2023-05-24 12:33:11 +02:00
- nix build -o image_link --experimental-features 'nix-command flakes' .#docker
- cp image_link image
2023-05-20 23:11:08 +02:00
when:
matrix:
2023-05-24 12:33:11 +02:00
PYTHON_VERSION: {{ cookiecutter.python_min_version}} # Still not sure about how to make flake for different python version
push_image:
image: quay.io/podman/stable:latest
pull: true
commands:
- podman login -u {{ cookiecutter.git_user }} -p $GITEA_TOKEN {{ cookiecutter.gitea_url.removeprefix('https://') }}
- podman load < image
- podman push {{ cookiecutter.project_slug }}:latest {{ cookiecutter.gitea_url.removeprefix('https://') }}/{{ cookiecutter.git_user }}/{{ cookiecutter.project_slug }}:latest
secrets: [ gitea_token ]
when:
matrix:
PYTHON_VERSION: {{ cookiecutter.python_min_version}} # Still not sure about how to make flake for different python version
2023-05-20 23:11:08 +02:00
2023-05-19 19:35:18 +02:00
matrix:
PYTHON_VERSION:
2023-05-24 12:33:11 +02:00
- {{ cookiecutter.python_min_version}}