d0aab9212a
test release tool / test-release-tool (macOS-latest, 3.12) (push) Waiting to run
test release tool / test-release-tool (macOS-latest, 3.13) (push) Waiting to run
test release tool / test-release-tool (macOS-latest, 3.14) (push) Waiting to run
test release tool / test-release-tool (macOS-latest, 3.15) (push) Waiting to run
docker / build (linux/arm64) (push) Waiting to run
docker / push (push) Blocked by required conditions
docs / docs (windows-latest) (push) Waiting to run
test release tool / test-release-tool (windows-latest, 3.12) (push) Waiting to run
test release tool / test-release-tool (windows-latest, 3.13) (push) Waiting to run
test release tool / test-release-tool (windows-latest, 3.14) (push) Waiting to run
test release tool / test-release-tool (windows-latest, 3.15) (push) Waiting to run
test / test (macOS-latest, 3.10) (push) Waiting to run
test / test (macOS-latest, 3.11) (push) Waiting to run
test / test (macOS-latest, 3.12.10) (push) Waiting to run
test / test (macOS-latest, 3.13) (push) Waiting to run
test / test (macOS-latest, 3.14) (push) Waiting to run
test / test (macOS-latest, 3.15) (push) Waiting to run
test / test (macOS-latest, pypy3.11-v7.3.22) (push) Waiting to run
test / test (windows-11-arm, 3.11) (push) Waiting to run
test / test (windows-11-arm, 3.12.10) (push) Waiting to run
test / test (windows-11-arm, 3.13) (push) Waiting to run
test / test (windows-11-arm, 3.14) (push) Waiting to run
test / test (windows-11-arm, 3.15) (push) Waiting to run
test / test (windows-latest, 3.10) (push) Waiting to run
test / test (windows-latest, 3.11) (push) Waiting to run
test / test (windows-latest, 3.12.10) (push) Waiting to run
test / test (windows-latest, 3.13) (push) Waiting to run
test / test (windows-latest, 3.14) (push) Waiting to run
test / test (windows-latest, 3.15) (push) Waiting to run
test / test (windows-latest, pypy3.11-v7.3.22) (push) Waiting to run
test / coveralls-finish (push) Blocked by required conditions
test / uvloop (macOS-latest) (push) Waiting to run
test / uvloop (windows-11-arm) (push) Waiting to run
test / uvloop (windows-latest) (push) Waiting to run
fuzz / fuzz (3.11) (push) Failing after 1s
fuzz / fuzz (3.12) (push) Failing after 1s
build and publish / sdist + pure wheel (push) Failing after 0s
diff-shades / analysis / base / ${{ matrix.mode }} (push) Has been skipped
diff-shades / compare / ${{ matrix.mode }} (push) Waiting to run
docs / docs (ubuntu-latest) (push) Failing after 2s
fuzz / fuzz (3.10) (push) Failing after 1s
fuzz / fuzz (3.14) (push) Failing after 0s
lint and format / lint (push) Failing after 1s
build and publish / publish-mypyc (push) Waiting to run
diff-shades / configure (push) Failing after 1s
docker / build (linux/amd64) (push) Has been skipped
diff-shades / analysis / target / ${{ matrix.mode }} (push) Has been skipped
fuzz / fuzz (3.13) (push) Failing after 0s
fuzz / create-issue (push) Waiting to run
build and publish / generate wheels matrix (push) Failing after 0s
test release tool / test-release-tool (ubuntu-latest, 3.13) (push) Failing after 1s
build and publish / mypyc wheels ${{ matrix.only }} (push) Has been skipped
build and publish / publish-hatch (push) Waiting to run
test / test (ubuntu-latest, 3.10) (push) Failing after 0s
test / test (ubuntu-latest, 3.11) (push) Failing after 1s
test / test (ubuntu-latest, 3.13) (push) Failing after 0s
test / test (ubuntu-latest, pypy3.11-v7.3.22) (push) Failing after 1s
test / test (ubuntu-latest, 3.15) (push) Failing after 1s
test release tool / test-release-tool (ubuntu-latest, 3.15) (push) Failing after 0s
zizmor / zizmor (push) Failing after 0s
test release tool / test-release-tool (ubuntu-latest, 3.12) (push) Failing after 4s
test release tool / test-release-tool (ubuntu-latest, 3.14) (push) Failing after 3s
test / uvloop (ubuntu-latest) (push) Failing after 1s
test / test (ubuntu-latest, 3.14) (push) Failing after 1s
test / test (ubuntu-latest, 3.12.10) (push) Failing after 5s
88 lines
2.6 KiB
YAML
88 lines
2.6 KiB
YAML
name: "Black"
|
|
description: "The uncompromising Python code formatter."
|
|
author: "Łukasz Langa and contributors to Black"
|
|
inputs:
|
|
options:
|
|
description:
|
|
"Options passed to Black. Use `black --help` to see available options. Default:
|
|
'--check --diff'"
|
|
required: false
|
|
default: "--check --diff"
|
|
src:
|
|
description: "Source to run Black. Default: '.'"
|
|
required: false
|
|
default: "."
|
|
jupyter:
|
|
description:
|
|
"Set this option to true to include Jupyter Notebook files. Default: false"
|
|
required: false
|
|
default: false
|
|
black_args:
|
|
description: "[DEPRECATED] Black input arguments."
|
|
required: false
|
|
default: ""
|
|
deprecationMessage:
|
|
"Input `with.black_args` is deprecated. Use `with.options` and `with.src` instead."
|
|
version:
|
|
description: 'Python Version specifier (PEP440) - e.g. "21.5b1"'
|
|
required: false
|
|
default: ""
|
|
use_pyproject:
|
|
description: Read Black version specifier from pyproject.toml if `true`.
|
|
required: false
|
|
default: "false"
|
|
summary:
|
|
description: "Whether to add the output to the workflow summary"
|
|
required: false
|
|
default: true
|
|
output-file:
|
|
description: >
|
|
Optional path to write Black output to a file in addition to stdout. Useful for
|
|
keeping GitHub Actions logs clean when using --diff or --check.
|
|
required: false
|
|
default: ""
|
|
branding:
|
|
color: "black"
|
|
icon: "check-circle"
|
|
runs:
|
|
using: composite
|
|
steps:
|
|
- name: black
|
|
run: |
|
|
# Even when black fails, do not close the shell
|
|
set +e
|
|
|
|
if [ "$RUNNER_OS" == "Windows" ]; then
|
|
runner="python"
|
|
else
|
|
runner="python3"
|
|
fi
|
|
|
|
out=$(${runner} $GITHUB_ACTION_PATH/action/main.py)
|
|
exit_code=$?
|
|
|
|
# Display the raw output in the step
|
|
echo "${out}"
|
|
|
|
if [ "${INPUT_SUMMARY}" == "true" ]; then
|
|
# Display the Markdown output in the job summary
|
|
echo "\`\`\`python" >> $GITHUB_STEP_SUMMARY
|
|
echo "${out}" >> $GITHUB_STEP_SUMMARY
|
|
echo "\`\`\`" >> $GITHUB_STEP_SUMMARY
|
|
fi
|
|
|
|
# Exit with the exit-code returned by Black
|
|
exit ${exit_code}
|
|
env:
|
|
# TODO: Remove once https://github.com/actions/runner/issues/665 is fixed.
|
|
INPUT_OPTIONS: ${{ inputs.options }}
|
|
INPUT_SRC: ${{ inputs.src }}
|
|
INPUT_JUPYTER: ${{ inputs.jupyter }}
|
|
INPUT_BLACK_ARGS: ${{ inputs.black_args }}
|
|
INPUT_VERSION: ${{ inputs.version }}
|
|
INPUT_USE_PYPROJECT: ${{ inputs.use_pyproject }}
|
|
INPUT_SUMMARY: ${{ inputs.summary }}
|
|
OUTPUT_FILE: ${{ inputs.output-file }}
|
|
pythonioencoding: utf-8
|
|
shell: bash
|