Skip to content

Commit

Permalink
use poetry to manage dependencies and release
Browse files Browse the repository at this point in the history
  • Loading branch information
jiak94 committed May 21, 2024
1 parent 30e40ec commit 7b3c5cd
Show file tree
Hide file tree
Showing 6 changed files with 589 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/build_publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: build and publish to pypi
on:
push:
tags:
- "*"

jobs:
test-package:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
lfs: false
- uses: actions/setup-python@v4
with:
python-version: "3.10"
- uses: abatilo/actions-poetry@v2
with:
poetry-version: "1.3.2"
- name: Add Poetry Plugins
run: |
poetry self add poetry-dynamic-versioning[plugin]
- name: Install dependencies
run: poetry install

- name: Run tests
run: poetry run pytest
env:
HEAD: release

- name: Config PIPY
run: poetry config pypi-token.pypi ${{ secrets.PIPY_TOKEN }}

- name: build and publish
run: poetry publish --build
25 changes: 25 additions & 0 deletions .github/workflows/unittest.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Run Unittest
on:
push:
branches:
- master
pull_request:
types: [opened, synchronize, closed]

jobs:
run_test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.10"
- uses: abatilo/actions-poetry@v2
with:
poetry-version: "1.3.2"
- name: Install Dependencies
run: poetry install
- name: Pytest
run: poetry run pytest
env:
HEAD: ${{ github.ref }}
Loading

0 comments on commit 7b3c5cd

Please sign in to comment.