mirror of
https://github.com/pyTooling/Actions.git
synced 2026-02-18 14:06:57 +08:00
v0.2.0
This commit is contained in:
37
.github/workflows/Package.yml
vendored
37
.github/workflows/Package.yml
vendored
@@ -31,9 +31,9 @@ on:
|
|||||||
default: '3.10'
|
default: '3.10'
|
||||||
type: string
|
type: string
|
||||||
requirements:
|
requirements:
|
||||||
description: 'Python dependencies to be installed through pip.'
|
description: 'Python dependencies to be installed through pip; if empty, use pyproject.toml through build.'
|
||||||
required: false
|
required: false
|
||||||
default: 'wheel'
|
default: ''
|
||||||
type: string
|
type: string
|
||||||
artifact:
|
artifact:
|
||||||
description: 'Name of the package artifact.'
|
description: 'Name of the package artifact.'
|
||||||
@@ -55,17 +55,38 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
python-version: ${{ inputs.python_version }}
|
python-version: ${{ inputs.python_version }}
|
||||||
|
|
||||||
- name: 🔧 Install dependencies for packaging and release
|
- name: 🐍 Update pip
|
||||||
run: |
|
run: python -m pip install -U pip
|
||||||
python -m pip install -U pip
|
|
||||||
python -m pip install ${{ inputs.requirements }}
|
|
||||||
|
|
||||||
- name: 🔨 Build Python package (source distribution)
|
# build
|
||||||
|
|
||||||
|
- name: 🔧 [build] Install dependencies for packaging and release
|
||||||
|
if: inputs.requirements == ''
|
||||||
|
run: python -m pip install build
|
||||||
|
|
||||||
|
- name: 🔨 [build] Build Python package (source distribution)
|
||||||
|
if: inputs.requirements == ''
|
||||||
|
run: python -m build --sdist
|
||||||
|
|
||||||
|
- name: 🔨 [build] Build Python package (binary distribution - wheel)
|
||||||
|
if: inputs.requirements == ''
|
||||||
|
run: python -m build --wheel
|
||||||
|
|
||||||
|
# setuptools
|
||||||
|
|
||||||
|
- name: 🔧 [setuptools] Install dependencies for packaging and release
|
||||||
|
if: inputs.requirements != ''
|
||||||
|
run: python -m pip install ${{ inputs.requirements }}
|
||||||
|
|
||||||
|
- name: 🔨 [setuptools] Build Python package (source distribution)
|
||||||
|
if: inputs.requirements != ''
|
||||||
run: python setup.py sdist
|
run: python setup.py sdist
|
||||||
|
|
||||||
- name: 🔨 Build Python package (binary distribution - wheel)
|
- name: 🔨 [setuptools] Build Python package (binary distribution - wheel)
|
||||||
|
if: inputs.requirements != ''
|
||||||
run: python setup.py bdist_wheel
|
run: python setup.py bdist_wheel
|
||||||
|
|
||||||
|
|
||||||
- name: 📤 Upload wheel artifact
|
- name: 📤 Upload wheel artifact
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
|
|||||||
2
.github/workflows/Parameters.yml
vendored
2
.github/workflows/Parameters.yml
vendored
@@ -36,7 +36,7 @@ on:
|
|||||||
default: '3.6 3.7 3.8 3.9 3.10'
|
default: '3.6 3.7 3.8 3.9 3.10'
|
||||||
type: string
|
type: string
|
||||||
name:
|
name:
|
||||||
description: 'Name of the tool.'
|
description: 'Name of the tool/package.'
|
||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
outputs:
|
outputs:
|
||||||
|
|||||||
9
.github/workflows/StaticTypeCheck.yml
vendored
9
.github/workflows/StaticTypeCheck.yml
vendored
@@ -44,6 +44,11 @@ on:
|
|||||||
description: 'Commands to run the static type checks.'
|
description: 'Commands to run the static type checks.'
|
||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
|
allow_failure:
|
||||||
|
description: 'Allow a type checking to be failing without failing the overall workflow.'
|
||||||
|
required: false
|
||||||
|
default: false
|
||||||
|
type: boolean
|
||||||
artifact:
|
artifact:
|
||||||
description: 'Name of the typing artifact.'
|
description: 'Name of the typing artifact.'
|
||||||
required: true
|
required: true
|
||||||
@@ -70,12 +75,12 @@ jobs:
|
|||||||
python -m pip install ${{ inputs.requirements }}
|
python -m pip install ${{ inputs.requirements }}
|
||||||
|
|
||||||
- name: Check Static Typing
|
- name: Check Static Typing
|
||||||
continue-on-error: true
|
continue-on-error: ${{ inputs.allow_failure }}
|
||||||
run: ${{ inputs.commands }}
|
run: ${{ inputs.commands }}
|
||||||
|
|
||||||
- name: 📤 Upload 'Static Typing Report' artifact
|
- name: 📤 Upload 'Static Typing Report' artifact
|
||||||
if: ${{ inputs.artifact != '' }}
|
if: ${{ inputs.artifact != '' }}
|
||||||
continue-on-error: true
|
continue-on-error: ${{ inputs.allow_failure }}
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: ${{ inputs.artifact }}
|
name: ${{ inputs.artifact }}
|
||||||
|
|||||||
@@ -70,6 +70,7 @@ jobs:
|
|||||||
python_version: ${{ fromJson(needs.Params.outputs.params).python_version }}
|
python_version: ${{ fromJson(needs.Params.outputs.params).python_version }}
|
||||||
requirements: '-r tests/requirements.txt'
|
requirements: '-r tests/requirements.txt'
|
||||||
report: 'htmlmypy'
|
report: 'htmlmypy'
|
||||||
|
allow_failure: true
|
||||||
|
|
||||||
PublishTestResults:
|
PublishTestResults:
|
||||||
uses: pyTooling/Actions/.github/workflows/PublishTestResults.yml@main
|
uses: pyTooling/Actions/.github/workflows/PublishTestResults.yml@main
|
||||||
|
|||||||
Reference in New Issue
Block a user