-
-
Notifications
You must be signed in to change notification settings - Fork 1
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
27 changed files
with
1,096 additions
and
626 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,20 @@ | ||
version: 2 | ||
updates: | ||
|
||
- package-ecosystem: pip | ||
directory: "/" | ||
schedule: | ||
interval: weekly | ||
time: "09:00" | ||
timezone: Europe/Dublin | ||
open-pull-requests-limit: 10 | ||
target-branch: develop | ||
|
||
- package-ecosystem: github-actions | ||
directory: "/" | ||
schedule: | ||
interval: weekly | ||
time: "09:00" | ||
timezone: Europe/Dublin | ||
open-pull-requests-limit: 10 | ||
target-branch: develop |
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,125 @@ | ||
name: Test and Publish | ||
|
||
on: | ||
push: | ||
|
||
pull_request: | ||
branches: [ 'develop' ] | ||
|
||
jobs: | ||
is-duplicate: | ||
name: Is Duplicate | ||
runs-on: ubuntu-latest | ||
outputs: | ||
should_skip: ${{ steps.skip-check.outputs.should_skip }} | ||
permissions: | ||
actions: write | ||
contents: read | ||
|
||
steps: | ||
- id: skip-check | ||
name: Skip Check | ||
uses: fkirc/skip-duplicate-actions@master | ||
with: | ||
paths_ignore: '["**.rst", "**.md", "**.txt"]' | ||
|
||
test-code: | ||
name: Test code | ||
runs-on: ${{ matrix.os }} | ||
needs: is-duplicate | ||
if: needs.is-duplicate.outputs.should_skip != 'true' | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, macos-latest, windows-latest] | ||
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11'] | ||
|
||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/[email protected] | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install tox | ||
- name: Test with Tox | ||
run: tox | ||
|
||
test-docs: | ||
name: Test documentation | ||
runs-on: ubuntu-latest | ||
needs: is-duplicate | ||
if: needs.is-duplicate.outputs.should_skip != 'true' | ||
env: | ||
PYTHON_VERSION: '3.x' | ||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Python ${{ env.PYTHON_VERSION }} | ||
uses: actions/[email protected] | ||
with: | ||
python-version: ${{ env.PYTHON_VERSION }} | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install .[docs] | ||
- name: Build documentation | ||
working-directory: docs | ||
run: make html | ||
|
||
publish-to-test-pypi: | ||
name: Publish to TestPyPI | ||
runs-on: ubuntu-latest | ||
environment: | ||
name: staging | ||
url: https://test.pypi.org/project/hdlcontroller/ | ||
permissions: | ||
# Required for trusted publishing on PyPI. | ||
id-token: write | ||
needs: [test-code, test-docs] | ||
if: | | ||
!failure() && | ||
github.event_name == 'push' && | ||
startsWith(github.ref, 'refs/tags/v') | ||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Publish to TestPyPI | ||
uses: pypa/[email protected] | ||
with: | ||
repository-url: https://test.pypi.org/legacy/ | ||
print-hash: true | ||
|
||
publish-to-pypi: | ||
name: Publish to PyPI | ||
runs-on: ubuntu-latest | ||
environment: | ||
name: production | ||
url: https://pypi.org/project/hdlcontroller/ | ||
permissions: | ||
# Required for trusted publishing on PyPI. | ||
id-token: write | ||
needs: [publish-to-test-pypi] | ||
if: | | ||
!failure() && | ||
github.event_name == 'push' && | ||
startsWith(github.ref, 'refs/tags/v') | ||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Publish to PyPI | ||
uses: pypa/[email protected] | ||
with: | ||
print-hash: true |
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 @@ | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: f71fa2c1f9cf5cb705f73dffe4b21f7c61470ba9 # frozen: v4.4.0 | ||
hooks: | ||
- id: check-ast | ||
- id: check-yaml | ||
- id: trailing-whitespace | ||
|
||
- repo: https://github.com/charliermarsh/ruff-pre-commit | ||
rev: e812d61e6e9d269f44ecda63904ed670a1948fe8 # frozen: v0.0.257 | ||
hooks: | ||
- id: ruff | ||
|
||
- repo: https://github.com/pycqa/isort | ||
rev: dbf82f2dd09ae41d9355bcd7ab69187a19e6bf2f # frozen: 5.12.0 | ||
hooks: | ||
- id: isort | ||
|
||
- repo: https://github.com/psf/black | ||
rev: b0d1fba7ac3be53c71fb0d3211d911e629f8aecb # frozen: 23.1.0 | ||
hooks: | ||
- id: black |
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
The MIT License (MIT) | ||
|
||
Copyright (c) 2015-2017 Paul-Emmanuel Raoul <[email protected]> | ||
Copyright (c) 2015-2023 Paul-Emmanuel Raoul <[email protected]> | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
|
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
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.