Skip to content

Commit

Permalink
Merge pull request #19 from HealthITAU/ci-workflows-update
Browse files Browse the repository at this point in the history
CI and workflows updates
  • Loading branch information
Yoshify authored Nov 2, 2023
2 parents 8abb7ec + 97c4545 commit a64a18c
Show file tree
Hide file tree
Showing 6 changed files with 70 additions and 28 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/pypi-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Upload Python Package

on:
release:
types: [published]

jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Publish PyPi package
uses: code-specialist/pypi-poetry-publish@v1
with:
ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PUBLISH_REGISTRY_PASSWORD: ${{ secrets.PYPI_TOKEN }}
46 changes: 46 additions & 0 deletions .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: 'Run tests'

on:
push:
branches: [main]
pull_request:

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

# If you wanted to use multiple Python versions, you'd have specify a matrix in the job and
# reference the matrixe python version here.
- uses: actions/setup-python@v2
with:
python-version: 3.11

# Cache the installation of Poetry
- name: cache poetry install
uses: actions/cache@v2
with:
path: ~/.local
key: poetry-1.1.12-0

# Install Poetry
- uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true

# Cache dependencies
- name: cache deps
id: cache-deps
uses: actions/cache@v2
with:
path: .venv
key: pydeps-${{ hashFiles('**/poetry.lock') }}

# Install dependencies
- run: poetry install --no-interaction --no-root
if: steps.cache-deps.outputs.cache-hit != 'true'

- run: poetry install --no-interaction
- run: poetry run pytest
28 changes: 0 additions & 28 deletions .github/workflows/python-publish.yml

This file was deleted.

4 changes: 4 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,7 @@ repos:
rev: "1.6.0"
hooks:
- id: poetry-check

ci:
autofix_prs: true
autofix_commit_msg: "[pre-commit.ci] automatic pre-commit fixes"
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

# pyConnectWise - An API library for ConnectWise Manage and ConnectWise Automate, written in Python

[![pre-commit.ci status](https://results.pre-commit.ci/badge/github/HealthITAU/pyconnectwise/main.svg)](https://results.pre-commit.ci/latest/github/HealthITAU/pyconnectwise/main)

pyConnectWise is a full-featured, type annotated API client written in Python for the ConnectWise APIs based off their OpenAPI schemas.

This library has been developed with the intention of making the ConnectWise APIs simple and accessible to non-coders while allowing experienced coders to utilize all features the API has to offer without the boilerplate.
Expand Down
1 change: 1 addition & 0 deletions src/pyconnectwise/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
from pyconnectwise.clients.manage_client import ConnectWiseManageAPIClient

__all__ = ["ConnectWiseManageAPIClient", "ConnectWiseAutomateAPIClient"]
__version__ = "0.5.1"

0 comments on commit a64a18c

Please sign in to comment.