Skip to content
This repository was archived by the owner on Nov 11, 2024. It is now read-only.

Commit 8f68153

Browse files
authored
feat: switch to poetry and add cd pipeline (#5)
1 parent 3040f01 commit 8f68153

File tree

6 files changed

+1243
-30
lines changed

6 files changed

+1243
-30
lines changed

.github/workflows/cd.yaml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: CD Workflow
2+
3+
on:
4+
push:
5+
tags:
6+
- "v[0-9]+.[0-9]+.[0-9]+"
7+
- "v[0-9]+.[0-9]+.[0-9]+-*"
8+
workflow_dispatch:
9+
10+
jobs:
11+
main:
12+
name: Build & Publish core
13+
runs-on: "ubuntu-latest"
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v4
17+
- name: Install Python
18+
uses: actions/setup-python@v5
19+
with:
20+
python-version: "3.8"
21+
- name: Build & Publish to PyPi
22+
uses: JRubics/[email protected]
23+
with:
24+
pypi_token: ${{ secrets.PYPI_TOKEN }}
25+
poetry_publish_options: "--build"

.github/workflows/ci.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,10 @@ jobs:
1818
with:
1919
python-version: ${{ matrix.python-version }}
2020
- name: Install
21-
run: make install-dev
21+
run: |
22+
pip install poetry
23+
poetry config virtualenvs.create false
24+
make install-dev
2225
- name: Lint
2326
run: make lint
2427
- name: Test

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
install:
22
pip install .
33
install-dev:
4-
pip install .[dev]
4+
poetry install --only dev --no-root; pip install -e .
55
test:
66
pytest
77
lint:

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ to use the [STACKIT Python SDK](https://github.com/stackitcloud/stackit-sdk-pyth
1111
## Compilation and Installation
1212

1313
You can install this package by running the following command from the root of the this repository:
14-
1514
```bash
1615
make install
1716
```
@@ -22,8 +21,9 @@ When developing, you can use a feature of `pip` called _Editable Installs_,
2221
which installs the local files like a package so you can test features without
2322
reinstalling the package every time.
2423
This package also defines additional depencies for development, like testing and linting.
24+
It requires [`poetry`](https://python-poetry.org/) to be installed. An installation guide can be found [here](https://python-poetry.org/docs/#installation).
2525

26-
Execute the following in the root folder of this repository:
26+
After installing `poetry` execute the following in the root folder of this repository:
2727

2828
```bash
2929
make install-dev

0 commit comments

Comments
 (0)