Skip to content

Update 20230629

Update 20230629 #638

Workflow file for this run

name: lint
on: [push, pull_request]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.7
uses: actions/setup-python@v2
with:
python-version: 3.7
- name: Install pre-commit hook
run: |
pwd&&ls
pip install pre-commit
pre-commit --version
- name: pre-commit checking
run: |
git fetch
git branch -a
git diff --name-status remotes/origin/master HEAD
updated_files=`git diff --name-status remotes/origin/master HEAD|awk '{print$ 2}'`
echo $updated_files
for file in $updated_files
do
if [ "${file##*.}" = "py" ]; then
echo $file
pre-commit run --files $file --show-diff-on-failure
fi
done