Skip to content

Fix force_store_pdf_enabled, improve logging and clean things #1958

Fix force_store_pdf_enabled, improve logging and clean things

Fix force_store_pdf_enabled, improve logging and clean things #1958

Workflow file for this run

name: pre-commit
on:
pull_request:
branches: [main]
jobs:
pre-commit:
runs-on: ubuntu-22.04
steps:
- name: Changed Files Exporter
uses: futuratrepadeira/[email protected]
id: changed-files
with:
repo-token: ${{ github.token }}
- uses: actions/checkout@v4
- name: Setup Python 2.7
run: |
sudo apt-get update
sudo apt-get install -y python2.7 python2.7-dev
sudo ln -sf python2.7 /usr/bin/python
curl https://bootstrap.pypa.io/pip/2.7/get-pip.py -o get-pip.py
python get-pip.py
rm get-pip.py
pip install --upgrade pip setuptools wheel
- name: Get python version
run: echo "PY=$(python -VV | sha256sum | cut -d' ' -f1)" >> $GITHUB_ENV
- uses: actions/cache@v1
with:
path: ~/.cache/pre-commit
key: pre-commit|${{ env.PY }}|${{ hashFiles('.pre-commit-config.yaml') }}
- name: Install pre-commit
run: pip install pre-commit
- name: Run pre-commit
run: pre-commit run --show-diff-on-failure --color=always --files ${{ steps.changed-files.outputs.files_created }} ${{ steps.changed-files.outputs.files_updated }}
- name: Check that all files generated by pre-commit are in git
run: |
newfiles="$(git ls-files --others --exclude-from=.gitignore)"
if [ "$newfiles" != "" ] ; then
echo "Please check-in the following files:"
echo "$newfiles"
exit 1
fi