forked from openviess/PyViCare
-
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.
- Loading branch information
Showing
33 changed files
with
10,406 additions
and
837 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,57 @@ | ||
--- | ||
name-template: "$RESOLVED_VERSION" | ||
tag-template: "$RESOLVED_VERSION" | ||
change-template: "- $TITLE @$AUTHOR (#$NUMBER)" | ||
sort-direction: ascending | ||
|
||
categories: | ||
- title: "🚨 Breaking changes" | ||
labels: | ||
- "breaking-change" | ||
- title: "✨ New features" | ||
labels: | ||
- "new-feature" | ||
- title: "🐛 Bug fixes" | ||
labels: | ||
- "bugfix" | ||
- title: "🚀 Enhancements" | ||
labels: | ||
- "enhancement" | ||
- "refactor" | ||
- "performance" | ||
- title: "🧰 Maintenance" | ||
labels: | ||
- "maintenance" | ||
- "ci" | ||
- title: "📚 Documentation" | ||
labels: | ||
- "documentation" | ||
- title: "⬆️ Dependency updates" | ||
labels: | ||
- "dependencies" | ||
|
||
version-resolver: | ||
major: | ||
labels: | ||
- "major" | ||
- "breaking-change" | ||
minor: | ||
labels: | ||
- "minor" | ||
- "new-feature" | ||
patch: | ||
labels: | ||
- "bugfix" | ||
- "chore" | ||
- "ci" | ||
- "dependencies" | ||
- "documentation" | ||
- "enhancement" | ||
- "performance" | ||
- "refactor" | ||
default: patch | ||
|
||
template: | | ||
## What’s changed | ||
$CHANGES |
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,13 @@ | ||
{ | ||
"$schema": "https://docs.renovatebot.com/renovate-schema.json", | ||
"extends": [ | ||
"config:recommended" | ||
], | ||
"labels": ["dependencies"], | ||
"packageRules": [ | ||
{ | ||
"matchDepTypes": ["devDependencies"], | ||
"labels": ["maintenance"] | ||
} | ||
] | ||
} |
This file was deleted.
Oops, something went wrong.
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,21 @@ | ||
name: Release Drafter | ||
|
||
# yamllint disable-line rule:truthy | ||
on: | ||
push: | ||
branches: | ||
- master | ||
workflow_dispatch: | ||
|
||
jobs: | ||
update_release_draft: | ||
name: ✏️ Draft release | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
pull-requests: read | ||
steps: | ||
- name: 🚀 Run Release Drafter | ||
uses: release-drafter/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_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,82 @@ | ||
name: Lint | ||
|
||
# yamllint disable-line rule:truthy | ||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
workflow_dispatch: | ||
env: | ||
DEFAULT_PYTHON: "3.11" | ||
jobs: | ||
codespell: | ||
name: codespell | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: ⤵️ Check out code from GitHub | ||
uses: actions/[email protected] | ||
- name: 🏗 Set up Poetry | ||
run: pipx install poetry | ||
- name: 🏗 Set up Python ${{ env.DEFAULT_PYTHON }} | ||
id: python | ||
uses: actions/[email protected] | ||
with: | ||
python-version: ${{ env.DEFAULT_PYTHON }} | ||
cache: "poetry" | ||
- name: 🏗 Install workflow dependencies | ||
run: | | ||
poetry config virtualenvs.create true | ||
poetry config virtualenvs.in-project true | ||
- name: 🏗 Install Python dependencies | ||
run: poetry install --no-interaction | ||
- name: 🚀 Check code for common misspellings | ||
run: poetry run codespell **/*.py | ||
|
||
ruff: | ||
name: ruff | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: ⤵️ Check out code from GitHub | ||
uses: actions/[email protected] | ||
- name: 🏗 Set up Poetry | ||
run: pipx install poetry | ||
- name: 🏗 Set up Python ${{ env.DEFAULT_PYTHON }} | ||
id: python | ||
uses: actions/[email protected] | ||
with: | ||
python-version: ${{ env.DEFAULT_PYTHON }} | ||
cache: "poetry" | ||
- name: 🏗 Install workflow dependencies | ||
run: | | ||
poetry config virtualenvs.create true | ||
poetry config virtualenvs.in-project true | ||
- name: 🏗 Install Python dependencies | ||
run: poetry install --no-interaction | ||
- name: 🚀 Run ruff linter | ||
run: poetry run ruff check --output-format=github . | ||
# - name: 🚀 Run ruff formatter | ||
# run: poetry run ruff format --check . | ||
|
||
pylint: | ||
name: pylint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: ⤵️ Check out code from GitHub | ||
uses: actions/[email protected] | ||
- name: 🏗 Set up Poetry | ||
run: pipx install poetry | ||
- name: 🏗 Set up Python ${{ env.DEFAULT_PYTHON }} | ||
id: python | ||
uses: actions/[email protected] | ||
with: | ||
python-version: ${{ env.DEFAULT_PYTHON }} | ||
cache: "poetry" | ||
- name: 🏗 Install workflow dependencies | ||
run: | | ||
poetry config virtualenvs.create true | ||
poetry config virtualenvs.in-project true | ||
- name: 🏗 Install Python dependencies | ||
run: poetry install --no-interaction | ||
- name: 🚀 Run pylint | ||
run: poetry run pylint **/*.py |
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 |
---|---|---|
@@ -1,26 +1,52 @@ | ||
name: Upload Python Package | ||
name: Release | ||
|
||
# yamllint disable-line rule:truthy | ||
on: | ||
release: | ||
types: [created] | ||
types: | ||
- published | ||
|
||
env: | ||
DEFAULT_PYTHON: "3.11" | ||
|
||
jobs: | ||
deploy: | ||
release: | ||
name: Releasing to PyPI | ||
runs-on: ubuntu-latest | ||
environment: | ||
name: PyPI | ||
url: https://pypi.org/p/PyViCare | ||
permissions: | ||
contents: write | ||
id-token: write | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
- name: ⤵️ Check out code from GitHub | ||
uses: actions/[email protected] | ||
- name: 🏗 Set up Poetry | ||
run: pipx install poetry | ||
- name: 🏗 Set up Python ${{ env.DEFAULT_PYTHON }} | ||
id: python | ||
uses: actions/[email protected] | ||
with: | ||
python-version: "3.x" | ||
- name: Install dependencies | ||
python-version: ${{ env.DEFAULT_PYTHON }} | ||
cache: "poetry" | ||
- name: 🏗 Install workflow dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install setuptools wheel twine | ||
- name: Build and publish | ||
env: | ||
TWINE_USERNAME: __token__ | ||
TWINE_PASSWORD: ${{ secrets.PYPI_APITOKEN }} | ||
poetry config virtualenvs.create true | ||
poetry config virtualenvs.in-project true | ||
- name: 🏗 Install dependencies | ||
run: poetry install --no-interaction | ||
- name: 🏗 Set package version | ||
run: | | ||
python setup.py sdist bdist_wheel | ||
twine upload dist/* | ||
version="${{ github.event.release.tag_name }}" | ||
version="${version,,}" | ||
version="${version#v}" | ||
poetry version --no-interaction "${version}" | ||
- name: 🏗 Build package | ||
run: poetry build --no-interaction | ||
- name: 🚀 Publish to PyPi | ||
uses: pypa/[email protected] | ||
with: | ||
verbose: true | ||
print-hash: true | ||
password: ${{ secrets.PYPI_APITOKEN }} |
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,45 @@ | ||
name: Test | ||
|
||
# yamllint disable-line rule:truthy | ||
on: | ||
push: | ||
branches: | ||
- main | ||
- master | ||
pull_request: | ||
workflow_dispatch: | ||
|
||
env: | ||
DEFAULT_PYTHON: "3.11" | ||
|
||
jobs: | ||
pytest: | ||
name: Python ${{ matrix.python }} | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python: ["3.8", "3.9", "3.10", "3.11", "3.12"] | ||
steps: | ||
- name: ⤵️ Check out code from GitHub | ||
uses: actions/[email protected] | ||
- name: 🏗 Set up Poetry | ||
run: pipx install poetry | ||
- name: 🏗 Set up Python ${{ matrix.python }} | ||
id: python | ||
uses: actions/[email protected] | ||
with: | ||
python-version: ${{ matrix.python }} | ||
cache: "poetry" | ||
- name: 🏗 Install workflow dependencies | ||
run: | | ||
poetry config virtualenvs.create true | ||
poetry config virtualenvs.in-project true | ||
- name: 🏗 Install dependencies | ||
run: poetry install --no-interaction | ||
- name: 🚀 Run pytest | ||
run: poetry run pytest --cov PyViCare | ||
- name: ⬆️ Upload coverage artifact | ||
uses: actions/[email protected] | ||
with: | ||
name: coverage-${{ matrix.python }} | ||
path: .coverage |
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,37 @@ | ||
name: Type | ||
|
||
# yamllint disable-line rule:truthy | ||
on: | ||
push: | ||
branches: | ||
- main | ||
- master | ||
pull_request: | ||
workflow_dispatch: | ||
|
||
env: | ||
DEFAULT_PYTHON: "3.11" | ||
|
||
jobs: | ||
mypy: | ||
name: mypy | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: ⤵️ Check out code from GitHub | ||
uses: actions/[email protected] | ||
- name: 🏗 Set up Poetry | ||
run: pipx install poetry | ||
- name: 🏗 Set up Python ${{ env.DEFAULT_PYTHON }} | ||
id: python | ||
uses: actions/[email protected] | ||
with: | ||
python-version: ${{ env.DEFAULT_PYTHON }} | ||
cache: "poetry" | ||
- name: 🏗 Install workflow dependencies | ||
run: | | ||
poetry config virtualenvs.create true | ||
poetry config virtualenvs.in-project true | ||
- name: 🏗 Install dependencies | ||
run: poetry install --no-interaction | ||
- name: 🚀 Run mypy | ||
run: poetry run mypy PyViCare tests |
Oops, something went wrong.