-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
2 changed files
with
104 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,33 @@ | ||
on: | ||
release: | ||
types: [created] | ||
|
||
jobs: | ||
|
||
build-and-publish: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Setup Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: "3.x" | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install --upgrade setuptools wheel twine | ||
- name: Build wheel | ||
run: | | ||
python setup.py build bdist_wheel | ||
- name: Publish to PyPI | ||
env: | ||
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} | ||
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} | ||
run: | | ||
twine upload --verbose 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 |
---|---|---|
@@ -0,0 +1,71 @@ | ||
name: Static Analysis & Test | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
|
||
static-analysis: | ||
|
||
# We want to run on external PRs, but not on our own internal PRs as they'll | ||
# be run by the push to the branch. Without this if check, checks are | ||
# duplicated since internal PRs match both the push and pull_request events. | ||
# https://github.com/psf/black/blob/f51e53726b39a177355a7917c91c56f390dda7ef/.github/workflows/lint.yml#L7-L12 | ||
if: | ||
github.event_name == 'push' || github.event.pull_request.head.repo.full_name != | ||
github.repository | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: "3.x" | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install tox | ||
- name: Lint with flake8 | ||
run: tox -e flake8 | ||
|
||
- name: Format with black | ||
run: tox -e black | ||
|
||
|
||
# test: | ||
|
||
# # We want to run on external PRs, but not on our own internal PRs as they'll | ||
# # be run by the push to the branch. Without this if check, checks are | ||
# # duplicated since internal PRs match both the push and pull_request events. | ||
# if: | ||
# github.event_name == 'push' || github.event.pull_request.head.repo.full_name != | ||
# github.repository | ||
|
||
# runs-on: ubuntu-latest | ||
|
||
# strategy: | ||
# matrix: | ||
# python: ["2.7", "3.6", "3.7", "3.8", "3.9", "3.10"] | ||
|
||
# steps: | ||
# - name: Checkout code | ||
# uses: actions/checkout@v2 | ||
|
||
# - name: Setup Python | ||
# uses: actions/setup-python@v2 | ||
# with: | ||
# python-version: ${{ matrix.python }} | ||
|
||
# - name: Install dependencies | ||
# run: | | ||
# python -m pip install --upgrade pip | ||
# python -m pip install tox | ||
|
||
# - name: Run Tox | ||
# run: | | ||
# tox -e py |