Skip to content

more changes again 2 #4

more changes again 2

more changes again 2 #4

Workflow file for this run

name: Check formatting

Check failure on line 1 in .github/workflows/format.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/format.yml

Invalid workflow file

`workfow_call` is not a valid event name
on:
workfow_call:
inputs:
python_v:
description: "Python version needed to run the code, eg. 3.10.6"
default: 3.10.6
required: false
type: string
jobs:
format:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- name: Set up Python ${{ inputs.python_v }}
uses: actions/setup-python@v4
with:
python-version: ${{ inputs.python_v }}
- name: Install pre-commit
run: |
python -m pip install --upgrade pip
pip install pre-commit
pre-commit install
- name: Run pre-commit (all files)
run: |
if test -f ".pre-commit-config.yaml"
then
pre-commit run --all-files --show-diff-on-failure
else
echo "::warning::No pre-commit config available"
fi