From 55607dba45fd3b3d41bbe141a75163df304bb30d Mon Sep 17 00:00:00 2001 From: Andreas Kluge Svendsrud <89779148+kluge7@users.noreply.github.com> Date: Sun, 16 Nov 2025 23:11:27 +0100 Subject: [PATCH 1/7] refactor: remove .github/issue_template/ since unused and conflicted with global issue template --- .github/issue_template/task-template.md | 14 -------------- 1 file changed, 14 deletions(-) delete mode 100644 .github/issue_template/task-template.md diff --git a/.github/issue_template/task-template.md b/.github/issue_template/task-template.md deleted file mode 100644 index 5db17f9..0000000 --- a/.github/issue_template/task-template.md +++ /dev/null @@ -1,14 +0,0 @@ ---- -name: Task template -about: 'Use this template when defining a new task in an issue. Make sure to fill - out all the fields. ' -title: "[TASK]" -labels: '' -assignees: '' - ---- - -**Time estimate:** XX hours -**Deadline:** DD.MONTH - -**Description of task:** DESCRIPTION From dca0d19a6a0a9ae98abd20b7a6b96e14c5ea967b Mon Sep 17 00:00:00 2001 From: Andreas Kluge Svendsrud <89779148+kluge7@users.noreply.github.com> Date: Sun, 16 Nov 2025 23:11:59 +0100 Subject: [PATCH 2/7] refactor(industrial-ci): now only runs on push to main or pull_request of specific types --- .github/workflows/industrial-ci.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/industrial-ci.yml b/.github/workflows/industrial-ci.yml index 1e5046c..81686ff 100644 --- a/.github/workflows/industrial-ci.yml +++ b/.github/workflows/industrial-ci.yml @@ -2,9 +2,15 @@ name: Industrial CI on: push: + branches: + - main + pull_request: + types: [ opened, synchronize, reopened, ready_for_review ] workflow_dispatch: schedule: - cron: '0 1 * * *' # Runs daily to check for dependency issues or flaking tests jobs: call_reusable_workflow: uses: vortexntnu/vortex-ci/.github/workflows/reusable-industrial-ci.yml@main + with: + ros_repo: '["testing", "main"]' \ No newline at end of file From ef261e7f6db3883d529ee593a395f718f6abb1ea Mon Sep 17 00:00:00 2001 From: Andreas Kluge Svendsrud <89779148+kluge7@users.noreply.github.com> Date: Sun, 16 Nov 2025 23:13:34 +0100 Subject: [PATCH 3/7] ci(pre-commit): add github actions workflow and add ament_* hooks --- .github/workflows/pre-commit.yml | 14 +++++++++++ .pre-commit-config.yaml | 42 +++++++++++++++++++++++++++----- 2 files changed, 50 insertions(+), 6 deletions(-) create mode 100644 .github/workflows/pre-commit.yml diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml new file mode 100644 index 0000000..4e08af8 --- /dev/null +++ b/.github/workflows/pre-commit.yml @@ -0,0 +1,14 @@ +name: pre-commit +on: + push: + branches: + - main + pull_request: + types: [ opened, synchronize, reopened, ready_for_review ] + workflow_dispatch: +jobs: + call_reusable_workflow: + uses: vortexntnu/vortex-ci/.github/workflows/reusable-pre-commit.yml@main + with: + ros_distro: 'humble' + config_path: '.pre-commit-config.yaml' diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index e1850c7..981f9eb 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -15,7 +15,7 @@ repos: # Standard hooks - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v5.0.0 + rev: v6.0.0 hooks: - id: check-added-large-files - id: check-ast @@ -35,7 +35,7 @@ repos: - id: requirements-txt-fixer # Python hooks - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.9.2 + rev: v0.14.5 hooks: - id: ruff-format - id: ruff @@ -70,16 +70,46 @@ repos: pass_filenames: true # C++ hooks - repo: https://github.com/pre-commit/mirrors-clang-format - rev: v19.1.7 + rev: v21.1.5 hooks: - id: clang-format args: [--style=file] + - repo: local + hooks: + - id: ament_cppcheck + name: ament_cppcheck + description: Static code analysis of C/C++ files. + entry: env AMENT_CPPCHECK_ALLOW_SLOW_VERSIONS=1 ament_cppcheck + language: system + files: \.(h\+\+|h|hh|hxx|hpp|cuh|c|cc|cpp|cu|c\+\+|cxx|tpp|txx)$ + exclude: (^|/)(test|tests)/.* # exclude test dirs since ament_cppcheck misparses GTest macros and throws false syntax errors + - repo: local + hooks: + - id: ament_cpplint + name: ament_cpplint + description: Static code analysis of C/C++ files. + entry: ament_cpplint + language: system + files: \.(h\+\+|h|hh|hxx|hpp|cuh|c|cc|cpp|cu|c\+\+|cxx|tpp|txx)$ + args: [ + "--linelength=120", + "--filter=-whitespace/newline,-legal/copyright,-build/include_order" # ignore build/include_order since it conflicts with .clang-format + ] + # CMake hooks + - repo: local + hooks: + - id: ament_lint_cmake + name: ament_lint_cmake + description: Check format of CMakeLists.txt files. + entry: ament_lint_cmake + language: system + files: CMakeLists\.txt$ # Spellcheck in comments and docs - repo: https://github.com/codespell-project/codespell - rev: v2.3.0 + rev: v2.4.1 hooks: - id: codespell - args: ['--write-changes', '--ignore-words-list=theses,fom'] + args: ['--write-changes', '--ignore-words-list=theses,fom,NED,ENU'] ci: - autoupdate_schedule: quarterly + autoupdate_schedule: quarterly \ No newline at end of file From c87ea90f094df41258eea7d14be85584017794a1 Mon Sep 17 00:00:00 2001 From: Andreas Kluge Svendsrud <89779148+kluge7@users.noreply.github.com> Date: Sun, 16 Nov 2025 23:14:04 +0100 Subject: [PATCH 4/7] ci(codecov): add codecov CI --- .github/workflows/code-coverage.yml | 12 ++++++++++++ codecov.yml | 17 +++++++++++++++++ 2 files changed, 29 insertions(+) create mode 100644 .github/workflows/code-coverage.yml create mode 100644 codecov.yml diff --git a/.github/workflows/code-coverage.yml b/.github/workflows/code-coverage.yml new file mode 100644 index 0000000..d373b3e --- /dev/null +++ b/.github/workflows/code-coverage.yml @@ -0,0 +1,12 @@ +name: Code Coverage +on: + push: + branches: + - main + pull_request: + types: [ opened, synchronize, reopened, ready_for_review ] +jobs: + call_reusable_workflow: + uses: vortexntnu/vortex-ci/.github/workflows/reusable-code-coverage.yml@main + secrets: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} # Set in the repository secrets diff --git a/codecov.yml b/codecov.yml new file mode 100644 index 0000000..f49585e --- /dev/null +++ b/codecov.yml @@ -0,0 +1,17 @@ +coverage: + precision: 2 + round: down + status: + project: + default: + informational: true + flags: + - unittests + patch: off +comment: + layout: "diff, flags, files" + behavior: default +flags: + unittests: + paths: + - "**" From 75279408d87899e8f9b22bbe3515ff1aa7af7241 Mon Sep 17 00:00:00 2001 From: Andreas Kluge Svendsrud <89779148+kluge7@users.noreply.github.com> Date: Sun, 16 Nov 2025 23:14:34 +0100 Subject: [PATCH 5/7] refactor: apply formatting changes --- .github/workflows/industrial-ci.yml | 2 +- .pre-commit-config.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/industrial-ci.yml b/.github/workflows/industrial-ci.yml index 81686ff..2da7f9d 100644 --- a/.github/workflows/industrial-ci.yml +++ b/.github/workflows/industrial-ci.yml @@ -13,4 +13,4 @@ jobs: call_reusable_workflow: uses: vortexntnu/vortex-ci/.github/workflows/reusable-industrial-ci.yml@main with: - ros_repo: '["testing", "main"]' \ No newline at end of file + ros_repo: '["testing", "main"]' diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 981f9eb..2b28f20 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -112,4 +112,4 @@ repos: args: ['--write-changes', '--ignore-words-list=theses,fom,NED,ENU'] ci: - autoupdate_schedule: quarterly \ No newline at end of file + autoupdate_schedule: quarterly From 4a421377aaa31ae42e759758b28713004b833ce1 Mon Sep 17 00:00:00 2001 From: Andreas Kluge Svendsrud <89779148+kluge7@users.noreply.github.com> Date: Sun, 16 Nov 2025 23:18:08 +0100 Subject: [PATCH 6/7] refactor(ci): rename workflow job names --- .github/workflows/code-coverage.yml | 2 +- .github/workflows/industrial-ci.yml | 2 +- .github/workflows/pre-commit.yml | 2 +- .github/workflows/semantic-release.yml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/code-coverage.yml b/.github/workflows/code-coverage.yml index d373b3e..7b9b6db 100644 --- a/.github/workflows/code-coverage.yml +++ b/.github/workflows/code-coverage.yml @@ -6,7 +6,7 @@ on: pull_request: types: [ opened, synchronize, reopened, ready_for_review ] jobs: - call_reusable_workflow: + code-coverage: uses: vortexntnu/vortex-ci/.github/workflows/reusable-code-coverage.yml@main secrets: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} # Set in the repository secrets diff --git a/.github/workflows/industrial-ci.yml b/.github/workflows/industrial-ci.yml index 2da7f9d..b9add24 100644 --- a/.github/workflows/industrial-ci.yml +++ b/.github/workflows/industrial-ci.yml @@ -10,7 +10,7 @@ on: schedule: - cron: '0 1 * * *' # Runs daily to check for dependency issues or flaking tests jobs: - call_reusable_workflow: + industrial-ci: uses: vortexntnu/vortex-ci/.github/workflows/reusable-industrial-ci.yml@main with: ros_repo: '["testing", "main"]' diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index 4e08af8..115be34 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -7,7 +7,7 @@ on: types: [ opened, synchronize, reopened, ready_for_review ] workflow_dispatch: jobs: - call_reusable_workflow: + pre-commit: uses: vortexntnu/vortex-ci/.github/workflows/reusable-pre-commit.yml@main with: ros_distro: 'humble' diff --git a/.github/workflows/semantic-release.yml b/.github/workflows/semantic-release.yml index 70779d4..765aa2c 100644 --- a/.github/workflows/semantic-release.yml +++ b/.github/workflows/semantic-release.yml @@ -5,5 +5,5 @@ on: branches: - main jobs: - call_reusable_workflow: + semantic-release: uses: vortexntnu/vortex-ci/.github/workflows/reusable-semantic-release.yml@main From 1928fb2d359fb77ed4fb5e3045816a4752a0bf10 Mon Sep 17 00:00:00 2001 From: Andreas Kluge Svendsrud <89779148+kluge7@users.noreply.github.com> Date: Sun, 16 Nov 2025 23:32:08 +0100 Subject: [PATCH 7/7] ci(workflows): apply formatting changes --- .github/workflows/industrial-ci.yml | 2 +- .github/workflows/pre-commit.yml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/industrial-ci.yml b/.github/workflows/industrial-ci.yml index b9add24..23b5750 100644 --- a/.github/workflows/industrial-ci.yml +++ b/.github/workflows/industrial-ci.yml @@ -13,4 +13,4 @@ jobs: industrial-ci: uses: vortexntnu/vortex-ci/.github/workflows/reusable-industrial-ci.yml@main with: - ros_repo: '["testing", "main"]' + ros_repo: '["testing", "main"]' diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index 115be34..aaf534b 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -10,5 +10,5 @@ jobs: pre-commit: uses: vortexntnu/vortex-ci/.github/workflows/reusable-pre-commit.yml@main with: - ros_distro: 'humble' - config_path: '.pre-commit-config.yaml' + ros_distro: 'humble' + config_path: '.pre-commit-config.yaml'