-
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.
Merge pull request #173 from damar-wicaksono/dev
Merge `dev` to `main` prior to v0.1.0 release
- Loading branch information
Showing
9 changed files
with
190 additions
and
134 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 |
---|---|---|
@@ -1,107 +1,128 @@ | ||
name: Packaging | ||
|
||
on: | ||
- push | ||
- push | ||
|
||
jobs: | ||
format: | ||
name: Check code formatting | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v4.0.0 | ||
with: | ||
python-version: "3.10" | ||
- name: Install tox | ||
run: python -m pip install tox | ||
- name: Run black | ||
run: tox -e format | ||
lint: | ||
name: Check code linting | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v4.0.0 | ||
with: | ||
python-version: "3.10" | ||
- name: Install tox | ||
run: python -m pip install tox | ||
- name: Run flake8 | ||
run: tox -e lint | ||
typecheck: | ||
name: Static type checking | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v4.0.0 | ||
with: | ||
python-version: "3.10" | ||
- name: Install tox | ||
run: python -m pip install tox | ||
- name: Run mypy | ||
run: tox -e typecheck | ||
test: | ||
name: Test | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python: | ||
- version: "3.7" | ||
toxenv: "py37" | ||
- version: "3.8" | ||
toxenv: "py38" | ||
- version: "3.9" | ||
toxenv: "py39" | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v4.0.0 | ||
with: | ||
python-version: ${{ matrix.python.version }} | ||
- name: Install tox | ||
run: python -m pip install tox | ||
- name: Run pytest | ||
run: tox -e ${{ matrix.python.toxenv }} | ||
coverage: | ||
name: Test (on Python 3.10) w/ coverage to CodeCov | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v4.0.0 | ||
with: | ||
python-version: "3.10" | ||
- name: Install tox | ||
run: python -m pip install tox | ||
- name: Run pytest | ||
run: tox -e "py310" -- --cov-report=xml --cov-report=term | ||
- name: Upload coverage reports to Codecov | ||
uses: codecov/codecov-action@v3 | ||
build_wheels: | ||
name: Build wheels on Ubuntu 20.04 | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v4.0.0 | ||
with: | ||
python-version: "3.10" | ||
- name: Install build | ||
run: python -m pip install build | ||
- name: Build wheels | ||
run: python -m build --wheel | ||
- uses: actions/upload-artifact@v3 | ||
with: | ||
path: ./dist/*.whl | ||
build_sdist: | ||
name: Build source distribution on Ubuntu 20.04 | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v4.0.0 | ||
with: | ||
python-version: "3.10" | ||
- name: Install build | ||
run: python -m pip install build | ||
- name: Build wheels | ||
run: python -m build --sdist | ||
- uses: actions/upload-artifact@v3 | ||
with: | ||
path: ./dist/*.tar.gz | ||
format: | ||
name: Check code formatting | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v4.0.0 | ||
with: | ||
python-version: "3.10" | ||
- name: Install tox | ||
run: python -m pip install tox | ||
- name: Run black | ||
run: tox -e format | ||
lint: | ||
name: Check code linting | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v4.0.0 | ||
with: | ||
python-version: "3.10" | ||
- name: Install tox | ||
run: python -m pip install tox | ||
- name: Run flake8 | ||
run: tox -e lint | ||
typecheck: | ||
name: Static type checking | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v4.0.0 | ||
with: | ||
python-version: "3.10" | ||
- name: Install tox | ||
run: python -m pip install tox | ||
- name: Run mypy | ||
run: tox -e typecheck | ||
test: | ||
name: Test | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python: | ||
- version: "3.7" | ||
toxenv: "py37" | ||
- version: "3.8" | ||
toxenv: "py38" | ||
- version: "3.9" | ||
toxenv: "py39" | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v4.0.0 | ||
with: | ||
python-version: ${{ matrix.python.version }} | ||
- name: Install tox | ||
run: python -m pip install tox | ||
- name: Run pytest | ||
run: tox -e ${{ matrix.python.toxenv }} | ||
coverage: | ||
name: Test (on Python 3.10) w/ coverage to CodeCov | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v4.0.0 | ||
with: | ||
python-version: "3.10" | ||
- name: Install tox | ||
run: python -m pip install tox | ||
- name: Run pytest | ||
run: tox -e "py310" -- --cov-report=xml --cov-report=term | ||
- name: Upload coverage reports to Codecov | ||
uses: codecov/codecov-action@v3 | ||
build_wheels: | ||
name: Build wheels on Ubuntu 20.04 | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v4.0.0 | ||
with: | ||
python-version: "3.10" | ||
- name: Install build | ||
run: python -m pip install build | ||
- name: Build wheels | ||
run: python -m build --wheel | ||
- uses: actions/upload-artifact@v3 | ||
with: | ||
path: ./dist/*.whl | ||
build_sdist: | ||
name: Build source distribution on Ubuntu 20.04 | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v4.0.0 | ||
with: | ||
python-version: "3.10" | ||
- name: Install build | ||
run: python -m pip install build | ||
- name: Build wheels | ||
run: python -m build --sdist | ||
- uses: actions/upload-artifact@v3 | ||
with: | ||
path: ./dist/*.tar.gz | ||
publish: | ||
name: Publish package | ||
if: startsWith(github.event.ref, 'refs/tags/v') | ||
needs: | ||
- format | ||
- lint | ||
- typecheck | ||
- test | ||
- coverage | ||
- build_wheels | ||
- build_sdist | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/download-artifact@v3 | ||
with: | ||
name: artifact | ||
path: ./dist/ | ||
- uses: pypa/gh-action-pypi-publish@release/v1 | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.PYPI_API_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
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 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 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 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
Oops, something went wrong.