-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
2 changed files
with
64 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
name: Upload Python Package | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
tags: | ||
- v*.*.* | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
pypi-publish: | ||
name: Upload release to PyPI | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Build and publish | ||
uses: JRubics/poetry-publish@v1.17 | ||
with: | ||
pypi_token: ${{ secrets.PYPI_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
name: Run Python tests | ||
|
||
on: [push] | ||
|
||
jobs: | ||
build: | ||
name: Run tests | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: ["3.9", "3.10", "3.11", "3.x"] | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install -U pip | ||
python -m pip install -U coverage pytest pytest-cov poetry | ||
python -m poetry install | ||
python -m poetry self add poetry-plugin-export | ||
python -m poetry export -f requirements.txt --output requirements.txt | ||
python -m pip install -r requirements.txt | ||
- name: Lint with Ruff | ||
run: | | ||
python -m pip install -U ruff | ||
ruff --per-file-ignores="__init__.py:F401" --per-file-ignores="__init__.py:E402" . | ||
continue-on-error: true | ||
|
||
- name: Test with pytest | ||
run: | | ||
coverage run -m pytest -v -s | ||
- name: Generate Coverage Report | ||
run: | | ||
coverage report -m |