publish.yml: Minor cosmetic change #560
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
--- | |
name: quality-checks | |
on: | |
pull_request: | |
push: | |
branches: | |
- main | |
workflow_call: | |
inputs: | |
ref: | |
required: true | |
type: string | |
workflow_dispatch: | |
inputs: | |
ref: | |
description: A git reference to check out. | |
default: main | |
required: true | |
type: string | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
outputs: | |
python-versions: >- | |
${{ steps.baipp.outputs.supported_python_classifiers_json_array }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: ${{ inputs.ref || github.ref }} | |
- uses: hynek/build-and-inspect-python-package@v2 | |
id: baipp | |
unit-tests: | |
needs: ["build"] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: extractions/setup-just@v2 | |
- uses: actions/download-artifact@v4 | |
with: | |
name: Packages | |
path: dist | |
- run: tar xf dist/*.tar.gz --strip-components=1 | |
- uses: actions/setup-python@v5 | |
with: | |
cache: pip | |
python-version: 3.x | |
- run: just pytest | |
compatibility-tests: | |
needs: ["build", "unit-tests"] | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ${{ fromJson(needs.build.outputs.python-versions) }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: ${{ inputs.ref || github.ref }} | |
- uses: actions/setup-python@v5 | |
with: | |
cache: pip | |
python-version: ${{ matrix.python-version }} | |
- uses: extractions/setup-just@v2 | |
- uses: actions/download-artifact@v4 | |
with: | |
name: Packages | |
path: dist | |
- run: | | |
rm -r _delb delb | |
test "$(find dist -name 'delb-*.whl' | wc -l)" -eq 1 | |
just test-wheel "$(find dist -name 'delb-*.whl')" | |
other-quality-checks: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
target: | |
- doctest | |
- lint | |
- mypy | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: ${{ inputs.ref || github.ref }} | |
- uses: actions/setup-python@v5 | |
with: | |
cache: pip | |
python-version: "3.x" | |
- uses: extractions/setup-just@v2 | |
- run: just ${{ matrix.target }} | |
... |