forked from github.com/pypiserver
readme output diff on format error (#512)
* feat: dependabot - add dependabot yml file to look in the docker & requirements folders - split the requirements out of the test.pip into a test-requirements.pip file so dependabot recognizes it It was found that in order to have the python dependabot recognize the requirements a naming convention had to be followed * feat: dependabot alter to monthly * feat: markdown diff Add a conditional check to output a diff between what mdformat expects and what is actually in the README.
This commit is contained in:
parent
9edae77659
commit
f14b92cfbf
|
@ -59,7 +59,22 @@ jobs:
|
||||||
- name: Check formatting
|
- name: Check formatting
|
||||||
run: black --diff --check .
|
run: black --diff --check .
|
||||||
- name: Validate README
|
- name: Validate README
|
||||||
|
id: validate_readme
|
||||||
run: mdformat --check README.md
|
run: mdformat --check README.md
|
||||||
|
continue-on-error: true
|
||||||
|
- name: check mdformat result
|
||||||
|
run: |
|
||||||
|
if [ "${{ steps.validate_readme.outcome }}" == "failure" ]; then
|
||||||
|
echo "copy readme to /tmp/pypiserver"
|
||||||
|
mkdir -p /tmp/pypiserver
|
||||||
|
cp README.md /tmp/pypiserver
|
||||||
|
echo "README.md is not formatted correctly. Please run 'mdformat README.md' and commit the result."
|
||||||
|
mdformat /tmp/pypiserver/README.md
|
||||||
|
diff -u README.md /tmp/pypiserver/README.md
|
||||||
|
exit 1
|
||||||
|
else
|
||||||
|
echo "README.md is formatted correctly."
|
||||||
|
fi
|
||||||
|
|
||||||
# Full-flow docker tests, again not python version dependent
|
# Full-flow docker tests, again not python version dependent
|
||||||
# We _could_ test this on MacOS, but it takes forever to get docker
|
# We _could_ test this on MacOS, but it takes forever to get docker
|
||||||
|
|
Loading…
Reference in New Issue