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:
Glenn 2023-08-22 06:40:48 -04:00 committed by GitHub
parent 9edae77659
commit f14b92cfbf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 15 additions and 0 deletions

View File

@ -59,7 +59,22 @@ jobs:
- name: Check formatting
run: black --diff --check .
- name: Validate README
id: validate_readme
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
# We _could_ test this on MacOS, but it takes forever to get docker