Add pre-commit hooks & BSD 3-Clause license #7
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: pre-commit | |
on: | |
push: | |
branches: | |
- main | |
- master | |
- ros2-devel | |
pull_request: | |
workflow_dispatch: | |
concurrency: | |
group: "${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}" | |
cancel-in-progress: true | |
env: | |
PYTHON_VERSION: "3.10" | |
jobs: | |
pre-commit: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ env.PYTHON_VERSION }} | |
## Run pre-commit and try to apply fixes | |
- name: Run pre-commit | |
uses: pre-commit/action@v3.0.1 | |
- name: Apply fixes from pre-commit | |
uses: pre-commit-ci/lite-action@v1.0.2 | |
if: always() | |
# - name: Install dependencies | |
# run: | | |
# python -m pip install --upgrade pip | |
# pip install --force-reinstall pylint==3.1.0 | |
# pip install overrides | |
# - name: Analysing the code with pylint | |
# run: | | |
# pylint --recursive=y --rcfile=.pylintrc . --disable fixme --disable import-error |