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

Commit

Permalink
feat: switch to poetry and add cd pipeline (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
MelvinKl authored Oct 29, 2024
1 parent 3040f01 commit 8f68153
Show file tree
Hide file tree
Showing 6 changed files with 1,243 additions and 30 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/cd.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: CD Workflow

on:
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]+"
- "v[0-9]+.[0-9]+.[0-9]+-*"
workflow_dispatch:

jobs:
main:
name: Build & Publish core
runs-on: "ubuntu-latest"
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: "3.8"
- name: Build & Publish to PyPi
uses: JRubics/[email protected]
with:
pypi_token: ${{ secrets.PYPI_TOKEN }}
poetry_publish_options: "--build"
5 changes: 4 additions & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@ jobs:
with:
python-version: ${{ matrix.python-version }}
- name: Install
run: make install-dev
run: |
pip install poetry
poetry config virtualenvs.create false
make install-dev
- name: Lint
run: make lint
- name: Test
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
install:
pip install .
install-dev:
pip install .[dev]
poetry install --only dev --no-root; pip install -e .
test:
pytest
lint:
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ to use the [STACKIT Python SDK](https://github.com/stackitcloud/stackit-sdk-pyth
## Compilation and Installation

You can install this package by running the following command from the root of the this repository:

```bash
make install
```
Expand All @@ -22,8 +21,9 @@ When developing, you can use a feature of `pip` called _Editable Installs_,
which installs the local files like a package so you can test features without
reinstalling the package every time.
This package also defines additional depencies for development, like testing and linting.
It requires [`poetry`](https://python-poetry.org/) to be installed. An installation guide can be found [here](https://python-poetry.org/docs/#installation).

Execute the following in the root folder of this repository:
After installing `poetry` execute the following in the root folder of this repository:

```bash
make install-dev
Expand Down
Loading

0 comments on commit 8f68153

Please sign in to comment.