43 lines
1.2 KiB
YAML
43 lines
1.2 KiB
YAML
name: Install and check package
|
|
description: installing and validationg the package
|
|
|
|
inputs:
|
|
pkg-name:
|
|
description: package name for import
|
|
required: false
|
|
default: ""
|
|
pip-flags:
|
|
description: additional pil install flags
|
|
required: false
|
|
default: ""
|
|
|
|
runs:
|
|
using: "composite"
|
|
steps:
|
|
- name: Determine package name
|
|
if: ${{ inputs.pkg-import == '' }}
|
|
working-directory: ./dist
|
|
run: python -c "import glob ; ls = glob.glob('*.tar.gz') ; name = '_'.join(ls[0].split('-')[:-1]) ; print(f'PKG_NAME={name}')" >> $GITHUB_ENV
|
|
shell: bash
|
|
|
|
- name: Pass package name
|
|
if: ${{ inputs.pkg-import != '' }}
|
|
run: echo "PKG_NAME=${{ inputs.pkg-name }}" >> $GITHUB_ENV
|
|
shell: bash
|
|
|
|
- name: Install | Uninstall package - archive
|
|
working-directory: ./dist
|
|
run: |
|
|
pip install *.tar.gz ${{ inputs.pip-flags }}
|
|
pip list | grep lightning
|
|
python -c "import ${PKG_NAME} ; print(${PKG_NAME}.__version__)"
|
|
shell: bash
|
|
|
|
- name: Install | Uninstall package - wheel
|
|
working-directory: ./dist
|
|
run: |
|
|
pip install *.whl ${{ inputs.pip-flags }}
|
|
pip list | grep lightning
|
|
python -c "import ${PKG_NAME} ; print(${PKG_NAME}.__version__)"
|
|
shell: bash
|