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 diff --git a/.github/workflows/code-coverage.yml b/.github/workflows/code-coverage.yml new file mode 100644 index 0000000..7b9b6db --- /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: + 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 1e5046c..23b5750 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: + 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 new file mode 100644 index 0000000..aaf534b --- /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: + pre-commit: + uses: vortexntnu/vortex-ci/.github/workflows/reusable-pre-commit.yml@main + with: + ros_distro: 'humble' + config_path: '.pre-commit-config.yaml' 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 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index e1850c7..2b28f20 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 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: + - "**"