Skip to content

Commit

Permalink
Merge pull request #39 from jiak94/master
Browse files Browse the repository at this point in the history
Introduce `Poetry` and `pytest`
  • Loading branch information
joshyattridge committed May 21, 2024
2 parents 30e40ec + 7b3c5cd commit 3922871
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 3922871

Please sign in to comment.