-
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
0 parents
commit 350a0ff
Showing
11 changed files
with
1,846 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,12 @@ | ||
# Set the default behavior, in case people don't have core.autocrlf set. | ||
* text=auto | ||
|
||
# Explicitly declare text files you want to always be normalized and converted to native line endings on checkout. | ||
*.txt text | ||
*.csv text | ||
*.py text | ||
*.kv text | ||
*.ini text | ||
*.md text | ||
*.sh text | ||
*.service text |
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,86 @@ | ||
name: CI | ||
|
||
on: [push] | ||
|
||
jobs: | ||
checks: | ||
name: Checks | ||
runs-on: ubuntu-22.04 | ||
timeout-minutes: 5 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Python 3.8 | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.8" | ||
- name: Cache pip | ||
uses: actions/cache@v4 | ||
with: | ||
path: ~/.cache/pip | ||
key: ${{ runner.os }}-3.8-${{ hashFiles('requirements.txt') }} | ||
- name: Update pip | ||
run: pip install .[extra] | ||
- name: Check formatting with Black | ||
run: black --check --diff . | ||
- name: Lint with flake8 | ||
run: flake8 . | ||
- name: Static type checking | ||
run: | | ||
# Use mypy for static type checking | ||
mkdir -p .mypy_cache # Workaround issue with mypy: https://github.com/tk-woven/mypy-install-types-mre | ||
mypy --install-types --non-interactive . | ||
dist: | ||
name: Build dist | ||
runs-on: ubuntu-22.04 | ||
timeout-minutes: 5 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Python 3.8 | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.8" | ||
- name: Install dependencies | ||
run: | | ||
pip install -U pip setuptools wheel | ||
pip install -U build | ||
- name: Build dist | ||
run: python -m build --sdist --wheel | ||
- name: Upload dist as artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: pybldc-${{ github.sha }} | ||
path: dist | ||
release: | ||
needs: [checks, dist] | ||
name: Release | ||
runs-on: ubuntu-22.04 | ||
timeout-minutes: 5 | ||
if: startsWith(github.ref, 'refs/tags/') | ||
steps: | ||
- name: Set up Python 3.8 | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.8" | ||
- uses: actions/download-artifact@v4 | ||
with: | ||
name: pybldc-${{ github.sha }} | ||
path: pybldc | ||
- name: Publish to PyPI server | ||
id: pypi | ||
run: | | ||
pip install -U pip setuptools wheel | ||
pip install -U twine | ||
twine check pybldc/* | ||
twine upload -u ${{ secrets.PYPI_USERNAME }} -p ${{ secrets.PYPI_PASSWORD }} pybldc/* | ||
- name: Calculate checksums | ||
run: | | ||
pushd pybldc | ||
sha256sum * > SHA256SUMS | ||
popd | ||
- name: Publish to Github Release | ||
if: ${{ ! cancelled() && steps.pypi.conclusion == 'success' }} | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
files: pybldc/* | ||
draft: true | ||
fail_on_unmatched_files: 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,9 @@ | ||
*.pyc | ||
.idea/ | ||
venv*/ | ||
.eggs/ | ||
*.egg-info/ | ||
build/ | ||
dist/ | ||
*.bin | ||
__pycache__/ |
Oops, something went wrong.