Skip to content

Commit

Permalink
Implement CI for checks and release
Browse files Browse the repository at this point in the history
  • Loading branch information
Oluwafemi Adenuga authored Oct 11, 2023
2 parents 554dbd9 + 32eccbb commit a5c26ac
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 2 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: CI

on:
pull_request:
push:
branches:
- main

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: pipx install poetry==1.6.1
- uses: actions/setup-python@v4
with:
python-version: "3.11"
cache: poetry
- run: poetry install
- run: poetry run black --check .
- run: poetry run mypy --check .
20 changes: 20 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Release

on:
release:
types:
- published

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: pipx install poetry==1.6.1
- uses: actions/setup-python@v4
with:
python-version: "3.11"
cache: poetry
- run: poetry install
- run: poetry config pypi-token.pypi ${{ secrets.PYPI_TOKEN }}
- run: poetry publish --build
4 changes: 2 additions & 2 deletions openproject/client.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import httpx
from exceptions import APIError, AuthenticationError
from openproject.exceptions import APIError, AuthenticationError
from openproject.types import WorkPackage


Expand Down Expand Up @@ -74,7 +74,7 @@ class WorkPackages(SubClient):
"lock_version": "lockVersion",
}

def _api_payload_from_kwargs(self, **kwargs) -> WorkPackage:
def _api_payload_from_kwargs(self, **kwargs: WorkPackage):
items = self._args_api_mapping.items()
data = {api_args: kwargs[args] for args, api_args in items if args in kwargs}
return data
Expand Down

0 comments on commit a5c26ac

Please sign in to comment.