Skip to content

Commit e9e5587

Browse files
Modify workflow to contain pre-commit and mypy config
Signed-off-by: Leander Stephen D'Souza <[email protected]>
1 parent aedcb15 commit e9e5587

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

.github/workflows/lint.yml

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,24 +11,25 @@ jobs:
1111
strategy:
1212
fail-fast: false
1313
matrix:
14-
linter: [xmllint, cpplint, uncrustify, pep257, flake8]
14+
linter: [xmllint, cpplint, uncrustify, pep257, flake8, mypy]
1515
steps:
1616
- uses: actions/checkout@v4
1717
- uses: ros-tooling/[email protected]
1818
with:
1919
linter: ${{ matrix.linter }}
2020
distribution: rolling
2121
package-name: "*"
22+
arguments: ${{ matrix.linter == 'mypy' && '--config tools/pyproject.toml' || '' }}
2223

23-
ament_lint_mypy:
24-
name: ament_mypy
24+
pre-commit:
2525
runs-on: ubuntu-latest
2626
container:
2727
image: rostooling/setup-ros-docker:ubuntu-noble-ros-rolling-ros-base-latest
2828
steps:
29-
- uses: actions/checkout@v4
30-
- uses: ros-tooling/[email protected]
31-
with:
32-
linter: mypy
33-
distribution: rolling
34-
package-name: "nav2_smac_planner"
29+
- uses: actions/checkout@v4
30+
- name: Install Python and pre-commit
31+
run: |
32+
apt-get update -y
33+
apt-get install -y pre-commit
34+
- name: Run pre-commit
35+
run: pre-commit run --all-files

0 commit comments

Comments
 (0)