-
Notifications
You must be signed in to change notification settings - Fork 6
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
1 parent
50618be
commit c8c7262
Showing
32 changed files
with
1,780 additions
and
379 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,58 @@ | ||
name: CI | ||
|
||
on: [push] | ||
|
||
jobs: | ||
build: | ||
name: Build and Test | ||
|
||
runs-on: ubuntu-latest | ||
strategy: | ||
max-parallel: 4 | ||
matrix: | ||
python-version: [3.6, 3.7, 3.8] | ||
|
||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Build and install | ||
run: | | ||
pip install . | ||
- name: Build distributions | ||
run: | | ||
pip install setuptools wheel | ||
python setup.py sdist bdist_wheel | ||
lint: | ||
name: Lint and Autoformat | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@master | ||
with: | ||
ref: ${{ github.ref }} | ||
- name: Set up Python | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: 3.8 | ||
- name: Black Code Formatter | ||
id: black | ||
run: | | ||
pip install black | ||
black . | ||
git diff --quiet && git diff --staged --quiet | ||
has_changed=$? | ||
echo "::set-output name=has_changed::$has_changed" | ||
echo $has_changed | ||
- name: Commit black changes | ||
if: steps.black.outputs.has_changed == 1 | ||
run: | | ||
git config --global user.name 'Felix Andreas' | ||
git config --global user.email '[email protected]' | ||
git remote set-url origin https://x-access-token:${{ secrets.REPO_ACCESS_TOKEN }}@github.com/${{ github.repository }} | ||
git commit -am "Automated Code Formatting using Black" | ||
git push |
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,26 @@ | ||
name: Upload Python Package | ||
|
||
on: | ||
release: | ||
types: [created] | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: Set up Python | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: '3.7' | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install setuptools wheel twine | ||
- name: Build and publish | ||
env: | ||
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} | ||
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} | ||
run: | | ||
python setup.py sdist bdist_wheel | ||
twine upload dist/* |
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,3 +1,20 @@ | ||
# Byte-compiled / optimized / DLL files | ||
# OS and IDE | ||
.DS_Store | ||
.idea | ||
.vscode | ||
|
||
# Byte-compiled / optimized / DLL files / Cache | ||
__pycache__/ | ||
*.py[cod] | ||
*$py.class | ||
.pytest_cache/ | ||
.mypy_cache/ | ||
|
||
# Distribution / packaging | ||
.Python | ||
build/ | ||
dist/ | ||
sdist/ | ||
wheels/ | ||
*.egg | ||
*.egg-info/ |
Oops, something went wrong.