-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: Akihiro Nitta <nitta@akihironitta.com>
- Loading branch information
1 parent
c16b888
commit 7bf0a35
Showing
6 changed files
with
159 additions
and
81 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,51 @@ | ||
name: Create and check package | ||
description: building, checking the package | ||
|
||
inputs: | ||
artifact-name: | ||
description: 'Unique name for collecting artifacts' | ||
required: false | ||
default: "" | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
|
||
- name: Prepare dev. env | ||
run: pip install "twine==4.0.2" setuptools wheel | ||
shell: bash | ||
|
||
- name: Source check | ||
run: python setup.py check --metadata --strict | ||
shell: bash | ||
|
||
- name: Create package 📦 | ||
# python setup.py clean | ||
run: python setup.py sdist bdist_wheel | ||
shell: bash | ||
|
||
- name: Check package 📦 | ||
working-directory: dist | ||
run: | | ||
ls -lh . | ||
twine check * | ||
shell: bash | ||
|
||
- name: Download 📥 previous packages | ||
if: ${{ inputs.artifact-name != '' }} | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: ${{ inputs.artifact-name }} | ||
path: pypi | ||
|
||
- name: copy/export pkg | ||
if: ${{ inputs.artifact-name != '' }} | ||
run: cp dist/* pypi/ | ||
shell: bash | ||
|
||
- name: Upload 📤 to the share store | ||
if: ${{ inputs.artifact-name != '' }} | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: ${{ inputs.artifact-name }} | ||
path: pypi |
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,53 @@ | ||
name: Install and check package | ||
description: installing and validationg the package | ||
|
||
inputs: | ||
artifact-name: | ||
description: 'Unique name for collecting artifacts' | ||
required: false | ||
default: "" | ||
import-name: | ||
description: 'Import name to test with after installation' | ||
required: true | ||
pip-flags: | ||
description: additional pil install flags | ||
required: false | ||
default: "" | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Download 📥 all packages | ||
if: ${{ inputs.artifact-name != '' }} | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: ${{ inputs.artifact-name }} | ||
path: pypi | ||
- name: show packages | ||
working-directory: pypi | ||
run: ls -lh | ||
shell: bash | ||
|
||
- name: Install package (wheel) | ||
working-directory: pypi/ | ||
run: | | ||
# TODO: reset env / conside add as conda | ||
pip install *.whl ${{ inputs.install-flags }} | ||
python -c "import ${{ inputs.import-name }} as pkg; print(f'version: {pkg.__version__}')" | ||
pip list | ||
shell: bash | ||
|
||
- name: Uninstall all | ||
run: | | ||
pip freeze > _reqs.txt | ||
pip uninstall -y -r _reqs.txt | ||
shell: bash | ||
|
||
- name: Install package (archive) | ||
working-directory: pypi/ | ||
run: | | ||
# TODO: reset env / conside add as conda | ||
pip install *.tar.gz ${{ inputs.install-flags }} | ||
python -c "import ${{ inputs.import-name }} as pkg; print(f'version: {pkg.__version__}')" | ||
pip list | ||
shell: bash |
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