-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* github actions * removed whitespace in src name * pyproject.toml field spelling * removed randomly-dont-reorganize * tmi -> alpineer * added in tox.ini for pycodestyle * removed unused import in setup.py
- Loading branch information
Showing
24 changed files
with
378 additions
and
299 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -0,0 +1,61 @@ | ||
name: Wheel Builder | ||
|
||
on: | ||
workflow_call: | ||
|
||
permissions: | ||
contents: read # to fetch code (actions/checkout) | ||
|
||
jobs: | ||
build_wheels: | ||
name: Build ${{ github.repository }} wheels on ${{ matrix.os }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
# Ensure that a wheel builder finishes even if another fails | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-latest, windows-latest, macos-12] | ||
|
||
steps: | ||
- name: Checkout ${{ github.repository }} | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Set up QEMU (For Linux ARM) | ||
if: runner.os == 'Linux' | ||
uses: docker/setup-qemu-action@v2 | ||
with: | ||
platforms: arm64 | ||
|
||
- name: Build Wheels | ||
uses: pypa/[email protected] | ||
with: | ||
package-dir: . | ||
output-dir: wheelhouse | ||
config-file: "{package}/pyproject.toml" | ||
|
||
- name: Store Wheel Artifacts | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: distributions | ||
path: wheelhouse/*.whl | ||
|
||
build_sdist: | ||
name: Build ${{ github.repository }} Source Distribution | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout ${{ github.repository }} | ||
uses: actions/checkout@v3 | ||
|
||
- name: Build sdist | ||
run: pipx run build --sdist | ||
|
||
- name: Check sdist Metadata | ||
run: pipx run twine check dist/* | ||
|
||
- name: Store sdist Artifacts | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: distributions | ||
path: dist/*.tar.gz |
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: | ||
branches: [main] | ||
pull_request: | ||
branches: [main] | ||
types: [labeled, opened, synchronize, reopened] | ||
workflow_dispatch: | ||
merge_group: | ||
types: [checks_requested] | ||
branches: [main] | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | ||
cancel-in-progress: true | ||
|
||
permissions: | ||
contents: read # to fetch code (actions/checkout) | ||
|
||
jobs: | ||
test: | ||
name: Test | ||
permissions: | ||
contents: read | ||
pull-requests: write | ||
secrets: inherit | ||
uses: ./.github/workflows/test.yml | ||
|
||
build: | ||
name: Build | ||
permissions: | ||
contents: read | ||
pull-requests: write | ||
secrets: inherit | ||
uses: ./.github/workflows/build.yml | ||
|
||
upload_coverage: | ||
needs: [test] | ||
name: Upload Coverage | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout ${{github.repository }} | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Download Coverage Artifact | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: coverage | ||
path: coverage | ||
|
||
- name: Upload Coverage to Coveralls | ||
uses: coverallsapp/github-action@master | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
path-to-lcov: ${{ github.workspace }}/coverage/coverage.lcov |
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: Build Wheels and upload to PyPI | ||
|
||
on: | ||
pull_request: | ||
branches: ["releases/**"] | ||
types: [labeled, opened, synchronize, reopened] | ||
release: | ||
types: [published] | ||
workflow_dispatch: | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | ||
cancel-in-progress: true | ||
|
||
permissions: | ||
contents: read # to fetch code (actions/checkout) | ||
|
||
jobs: | ||
test: | ||
name: Test | ||
permissions: | ||
contents: read | ||
secrets: inherit | ||
uses: ./.github/workflows/test.yml | ||
|
||
build_wheels_sdist: | ||
needs: [test] | ||
name: Build | ||
uses: ./.github/workflows/build.yml | ||
secrets: inherit | ||
|
||
test_pypi_publish: | ||
# Test PyPI publish, requires wheels and source dist (sdist) | ||
name: Publish ${{ github.repository }} to TestPyPI | ||
needs: [test, build_wheels_sdist] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/download-artifact@v3 | ||
with: | ||
name: distributions | ||
path: dist | ||
|
||
- uses: pypa/gh-action-pypi-publish@release/v1.6 | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.TEST_PYPI_API_TOKEN }} | ||
repository_url: https://test.pypi.org/legacy/ | ||
packages_dir: dist/ | ||
verbose: true | ||
|
||
pypi_publish: | ||
name: Publish ${{ github.repository }} to to PyPI | ||
needs: [test, build_wheels_sdist, test_pypi_publish] | ||
|
||
runs-on: ubuntu-latest | ||
# Publish when a GitHub Release is created, use the following rule: | ||
if: github.event_name == 'release' && github.event.action == 'published' | ||
steps: | ||
- name: Download Artifact | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: distributions | ||
path: dist | ||
|
||
- name: PYPI Publish | ||
uses: pypa/gh-action-pypi-publish@release/v1.6 | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.PYPI_API_TOKEN }} | ||
packages_dir: dist/ | ||
verbose: 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,39 @@ | ||
name: Test | ||
|
||
on: | ||
workflow_call: | ||
|
||
permissions: | ||
contents: read # to fetch code (actions/checkout) | ||
jobs: | ||
test: | ||
name: Test ${{ github.repository }} | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout ${{ github.repository }} | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Set up Python 3.8 | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3.8 | ||
cache-dependency-path: "**/pyproject.toml" | ||
cache: "pip" | ||
|
||
- name: Install Dependencies and ${{ github.repository }} | ||
run: | | ||
pip install .[test] | ||
- name: Run Tests | ||
run: | | ||
pytest | ||
- name: Archive Coverage | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: coverage | ||
path: | | ||
coverage.lcov |
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 |
---|---|---|
|
@@ -11,4 +11,5 @@ mibi_bin_tools/*.so | |
*.egg-info | ||
.coverage | ||
htmlcov/ | ||
.DS_Store | ||
.DS_Store | ||
.venv |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.