Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce Poetry and pytest #39

Merged
merged 1 commit into from
May 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading