diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index 5da03730aa..c2c613e385 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -609,6 +609,8 @@ jobs: - '' xfail: - false + check-name: + - '' include: - runner-vm-os: ubuntu-latest python-version: 3.11 @@ -616,41 +618,49 @@ jobs: environment-variables: '' tox-run-posargs: python-check-blanket-noqa --all-files xfail: true + check-name: python-check-blanket-noqa - runner-vm-os: ubuntu-latest python-version: 3.11 toxenv: pre-commit environment-variables: '' tox-run-posargs: flake8 --all-files xfail: true + check-name: flake8 - runner-vm-os: ubuntu-latest python-version: 3.11 toxenv: pre-commit environment-variables: '' tox-run-posargs: mypy-py313 --all-files xfail: true + check-name: MyPy @ Python 3.13 - runner-vm-os: ubuntu-latest python-version: 3.11 toxenv: pre-commit environment-variables: '' tox-run-posargs: mypy-py312 --all-files xfail: true + check-name: MyPy @ Python 3.12 - runner-vm-os: ubuntu-latest python-version: 3.11 toxenv: pre-commit environment-variables: '' tox-run-posargs: mypy-py311 --all-files xfail: true + check-name: MyPy @ Python 3.11 - runner-vm-os: ubuntu-latest python-version: 3.11 toxenv: pre-commit environment-variables: '' tox-run-posargs: pylint --all-files xfail: true + check-name: PyLint fail-fast: false uses: ./.github/workflows/reusable-tox.yml with: cache-key-files: >- ${{ needs.pre-setup.outputs.cache-key-files }} + check-name: >- + ${{ matrix.check-name }} dists-artifact-name: >- ${{ needs.pre-setup.outputs.dists-artifact-name }} environment-variables: >- @@ -766,7 +776,9 @@ jobs: jobs: ${{ toJSON(needs) }} publish-pypi: - name: Publish 🐍📦 ${{ needs.pre-setup.outputs.git-tag }} to PyPI + name: >- + 📦 + Publish ${{ needs.pre-setup.outputs.git-tag }} to PyPI needs: - check - pre-setup # transitive, for accessing settings @@ -799,13 +811,17 @@ jobs: ${{ needs.pre-setup.outputs.dists-artifact-name }} path: dist/ - name: >- - Publish 🐍📦 ${{ needs.pre-setup.outputs.git-tag }} to PyPI + 📦 + Publish ${{ needs.pre-setup.outputs.git-tag }} to PyPI + 🔏 uses: pypa/gh-action-pypi-publish@release/v1 with: attestations: true publish-testpypi: - name: Publish 🐍📦 ${{ needs.pre-setup.outputs.git-tag }} to TestPyPI + name: >- + 📦 + Publish ${{ needs.pre-setup.outputs.git-tag }} to TestPyPI needs: - check - pre-setup # transitive, for accessing settings @@ -842,7 +858,9 @@ jobs: ${{ needs.pre-setup.outputs.dists-artifact-name }} path: dist/ - name: >- - Publish 🐍📦 ${{ needs.pre-setup.outputs.git-tag }} to TestPyPI + 📦 + Publish ${{ needs.pre-setup.outputs.git-tag }} to TestPyPI + 🔏 uses: pypa/gh-action-pypi-publish@release/v1 with: attestations: true @@ -850,6 +868,7 @@ jobs: post-release-repo-update: name: >- + 🏷️ Publish post-release Git tag for ${{ needs.pre-setup.outputs.git-tag }} needs: @@ -912,6 +931,7 @@ jobs: uses: fregante/setup-git-user@v2 - name: >- + 🏷️ Tag the release in the local Git repo as ${{ needs.pre-setup.outputs.git-tag }} if: steps.existing-remote-tag-check.outputs.already-exists != 'true' @@ -935,6 +955,7 @@ jobs: ${{ github.event.inputs.release-committish }} - name: >- + 🏷️ Push ${{ needs.pre-setup.outputs.git-tag }} tag corresponding to the just published release back to GitHub if: steps.existing-remote-tag-check.outputs.already-exists != 'true' @@ -944,6 +965,7 @@ jobs: slsa-provenance: name: >- + 🔏 Save in-toto SLSA provenance as a GitHub workflow artifact for ${{ needs.pre-setup.outputs.git-tag }} needs: @@ -963,6 +985,7 @@ jobs: publish-github-attestations: name: >- + 🔏 Produce a GitHub-native Attestations for ${{ needs.pre-setup.outputs.git-tag }} needs: @@ -988,7 +1011,9 @@ jobs: ${{ needs.pre-setup.outputs.dists-artifact-name }} path: dist/ - - name: Generate provenance attestations for the dists + - name: >- + 🔏 + Generate provenance attestations for the dists uses: actions/attest-build-provenance@v1 with: subject-path: | @@ -997,6 +1022,7 @@ jobs: publish-github-release: name: >- + 🏷️ Publish a GitHub Release for ${{ needs.pre-setup.outputs.git-tag }} needs: diff --git a/.github/workflows/reusable-tox.yml b/.github/workflows/reusable-tox.yml index dee62fb238..d1ccacbcf8 100644 --- a/.github/workflows/reusable-tox.yml +++ b/.github/workflows/reusable-tox.yml @@ -18,6 +18,10 @@ on: description: Dependency files cache required: true type: string + check-name: + description: A custom name for the Checks API-reported status + required: false + type: string dists-artifact-name: description: Workflow artifact name containing dists required: true @@ -109,11 +113,14 @@ jobs: tox: name: >- ${{ - inputs.toxenv - }}@🐍${{ - inputs.python-version - }}@${{ - inputs.runner-vm-os + inputs.check-name + && inputs.check-name + || format( + '{0}@🐍{1}@{2}', + inputs.toxenv, + inputs.python-version, + inputs.runner-vm-os + ) }} runs-on: ${{ inputs.runner-vm-os }} diff --git a/.mypy.ini b/.mypy.ini index 478c48b31f..c10e72094a 100644 --- a/.mypy.ini +++ b/.mypy.ini @@ -21,6 +21,8 @@ follow_imports = normal ignore_missing_imports = false +mypy_path = ${MYPY_CONFIG_FILE_DIR}/src + namespace_packages = true pretty = true diff --git a/README.md b/README.md index 5379273893..eccf0163df 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,7 @@ [![CI/CD Badge]][CI/CD] +[![pre-commit.ci Badge]][pre-commit.ci] [![PyPI Badge]][PyPI] [![PyPI Supported Versions Badge]][PyPI Supported Versions] [![Codecov Badge]][Codecov] @@ -13,6 +14,9 @@ https://github.com/ansible/awx-plugins/actions/workflows/ci-cd.yml/badge.svg?branch=devel [CI/CD]: https://github.com/ansible/awx-plugins/actions/workflows/ci-cd.yml +[pre-commit.ci Badge](https://results.pre-commit.ci/badge/github/ansible/awx-plugins/devel.svg) +[pre-commit.ci](https://results.pre-commit.ci/latest/github/ansible/awx-plugins/devel) + [PyPI Badge]: https://img.shields.io/pypi/v/awx-plugins-core [PyPI]: https://pypi.org/p/awx-plugins-core