-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Changed vscode extentions to precommit --------- Signed-off-by: Jakub Delicat <[email protected]>
- Loading branch information
Showing
47 changed files
with
272 additions
and
169 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
# TODO: specify bump command and remove this description | ||
|
||
Bump version workflow is triggered when PR is closed, it bumps version and triggers docker build that will be tagged with version number. To use it you have to specify bump type, available commands: `bump::patch`, `bump::minor` and `bump::major` (simply leave one of them in PR description and remove this description). | ||
Bump version workflow is triggered when PR is closed, it bumps version and triggers docker build that will be tagged with version number. To use it you have to specify bump type, available commands: `bump::patch`, `bump::minor` and `bump::major` (simply leave one of them in PR description and remove this description). |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,15 @@ | ||
--- | ||
name: Black python lint | ||
|
||
on: | ||
workflow_call: | ||
push: | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: psf/black@stable | ||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: psf/black@stable | ||
with: | ||
options: --line-length=99 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,64 +1,63 @@ | ||
--- | ||
name: Trigger rosbot-docker to build an image and bump version | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
name: | ||
description: "Version to bump (major, minor, patch)" | ||
default: "patch" | ||
required: true | ||
pull_request: | ||
branches: humble | ||
types: [closed] | ||
workflow_dispatch: | ||
inputs: | ||
name: | ||
description: Version to bump (major, minor, patch) | ||
default: patch | ||
required: true | ||
pull_request: | ||
branches: humble | ||
types: [closed] | ||
|
||
jobs: | ||
get-bump: | ||
if: github.event_name == 'pull_request' && github.event.action == 'closed' && github.event.pull_request.merged == true | ||
name: Get version bump | ||
runs-on: ubuntu-22.04 | ||
outputs: | ||
bump: ${{ env.BUMP }} | ||
steps: | ||
- if: github.event_name == 'pull_request' && github.event.pull_request.merged == true | ||
get-bump: | ||
if: github.event_name == 'pull_request' && github.event.action == 'closed' && github.event.pull_request.merged == true | ||
name: Get version bump | ||
id: get-version-bump | ||
uses: husarion-ci/[email protected] | ||
- if: github.event_name == 'pull_request' && github.event.pull_request.merged == true | ||
run: echo "BUMP=${{ steps.get-version-bump.outputs.bump }}" >> $GITHUB_ENV | ||
- if: github.event_name == 'workflow_dispatch' | ||
run: echo "BUMP=${{ github.event.inputs.name }}" >> $GITHUB_ENV | ||
runs-on: ubuntu-22.04 | ||
outputs: | ||
bump: ${{ env.BUMP }} | ||
steps: | ||
- if: github.event_name == 'pull_request' && github.event.pull_request.merged == true | ||
name: Get version bump | ||
id: get-version-bump | ||
uses: husarion-ci/[email protected] | ||
- if: github.event_name == 'pull_request' && github.event.pull_request.merged == true | ||
run: echo "BUMP=${{ steps.get-version-bump.outputs.bump }}" >> $GITHUB_ENV | ||
- if: github.event_name == 'workflow_dispatch' | ||
run: echo "BUMP=${{ github.event.inputs.name }}" >> $GITHUB_ENV | ||
|
||
catkin-release: | ||
if: github.event_name == 'pull_request' && github.event.action == 'closed' && github.event.pull_request.merged == true | ||
name: Bump version | ||
runs-on: ubuntu-22.04 | ||
needs: get-bump | ||
outputs: | ||
new_version: ${{ steps.catkin-release.outputs.new_version }} | ||
steps: | ||
- | ||
name: Checkout | ||
uses: actions/checkout@v2 | ||
- | ||
name: Catkin release | ||
id: catkin-release | ||
uses: husarion-ci/[email protected] | ||
with: | ||
bump: ${{ needs.get-bump.outputs.bump }} | ||
github_token: ${{ secrets.GH_PAT }} | ||
git_user: action-bot | ||
git_email: [email protected] | ||
catkin-release: | ||
if: github.event_name == 'pull_request' && github.event.action == 'closed' && github.event.pull_request.merged == true | ||
name: Bump version | ||
runs-on: ubuntu-22.04 | ||
needs: get-bump | ||
outputs: | ||
new_version: ${{ steps.catkin-release.outputs.new_version }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Catkin release | ||
id: catkin-release | ||
uses: husarion-ci/[email protected] | ||
with: | ||
bump: ${{ needs.get-bump.outputs.bump }} | ||
github_token: ${{ secrets.GH_PAT }} | ||
git_user: action-bot | ||
git_email: [email protected] | ||
|
||
build-and-push-docker-image: | ||
if: github.event_name == 'pull_request' && github.event.action == 'closed' && github.event.pull_request.merged == true | ||
name: Create new docker image | ||
runs-on: ubuntu-22.04 | ||
needs: catkin-release | ||
steps: | ||
- name: trigger the endpoint | ||
run: > | ||
curl -X POST | ||
-H "Accept: application/vnd.github+json" | ||
-H "Authorization: Bearer ${{ secrets.GH_PAT }}" | ||
https://api.github.com/repos/husarion/rosbot-docker/dispatches | ||
-d '{"event_type":"ros-package-update"}' | ||
build-and-push-docker-image: | ||
if: github.event_name == 'pull_request' && github.event.action == 'closed' && github.event.pull_request.merged == true | ||
name: Create new docker image | ||
runs-on: ubuntu-22.04 | ||
needs: catkin-release | ||
steps: | ||
- name: trigger the endpoint | ||
run: > | ||
curl -X POST | ||
-H "Accept: application/vnd.github+json" | ||
-H "Authorization: Bearer ${{ secrets.GH_PAT }}" | ||
https://api.github.com/repos/husarion/rosbot-docker/dispatches | ||
-d '{"event_type":"ros-package-update"}' |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,21 @@ | ||
--- | ||
name: Industrial CI | ||
on: | ||
workflow_call: | ||
push: | ||
workflow_call: | ||
push: | ||
|
||
jobs: | ||
industrial_ci: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
ROS_DISTRO: [humble] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Clone installation requirements | ||
shell: bash | ||
run : python3 -m pip install -U vcstool && | ||
vcs import . < ./rosbot/rosbot_hardware.repos && | ||
vcs import . < ./rosbot/rosbot_simulation.repos | ||
- uses: ros-industrial/industrial_ci@master | ||
env: | ||
ROS_DISTRO: ${{matrix.ROS_DISTRO}} | ||
industrial_ci: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
ROS_DISTRO: [humble] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Clone installation requirements | ||
shell: bash | ||
run: python3 -m pip install -U vcstool && vcs import . < ./rosbot/rosbot_hardware.repos && vcs import . < ./rosbot/rosbot_simulation.repos | ||
- uses: ros-industrial/industrial_ci@master | ||
env: | ||
ROS_DISTRO: ${{matrix.ROS_DISTRO}} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,15 @@ | ||
--- | ||
name: Spellcheck Action | ||
|
||
on: | ||
workflow_call: | ||
push: | ||
workflow_call: | ||
push: | ||
|
||
jobs: | ||
build: | ||
name: Spellcheck | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: rojopolis/[email protected] | ||
name: Spellcheck | ||
build: | ||
name: Spellcheck | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: rojopolis/[email protected] | ||
name: Spellcheck |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,10 @@ | ||
.vscode | ||
*.pyc | ||
|
||
# ROS 2 build folders | ||
build | ||
install | ||
log | ||
*.pyc | ||
|
||
# ROSbots submodules | ||
rosbot_hardware_interfaces/ | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
--- | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.5.0 | ||
hooks: | ||
- id: check-merge-conflict | ||
- id: trailing-whitespace | ||
- id: end-of-file-fixer | ||
- id: check-yaml | ||
- id: check-xml | ||
- id: check-added-large-files | ||
- id: check-ast | ||
- id: check-json | ||
- id: name-tests-test | ||
files: ^.*\/test\/.*$ | ||
args: [--pytest-test-first] | ||
|
||
- repo: https://github.com/codespell-project/codespell | ||
rev: v1.16.0 | ||
hooks: | ||
- id: codespell | ||
name: codespell | ||
description: Checks for common misspellings in text files. | ||
entry: codespell * | ||
language: python | ||
types: [text] | ||
|
||
- repo: https://github.com/jumanjihouse/pre-commit-hook-yamlfmt | ||
rev: 0.2.1 | ||
hooks: | ||
- id: yamlfmt | ||
files: ^.github|./\.yaml | ||
|
||
- repo: https://github.com/psf/black | ||
rev: 22.12.0 | ||
hooks: | ||
- id: black | ||
args: ["--line-length=99"] | ||
|
||
- repo: https://github.com/PyCQA/flake8 | ||
rev: 6.1.0 | ||
hooks: | ||
- id: flake8 | ||
args: ["--ignore=E501"] # ignore too long line, black checks it | ||
|
||
- 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$ | ||
|
||
- repo: local | ||
hooks: | ||
- id: ament_copyright | ||
name: ament_copyright | ||
description: Check if copyright notice is available in all files. | ||
stages: [commit] | ||
entry: ament_copyright | ||
language: system | ||
|
||
# Docs - RestructuredText hooks | ||
- repo: https://github.com/PyCQA/doc8 | ||
rev: v1.1.1 | ||
hooks: | ||
- id: doc8 | ||
args: ['--max-line-length=100', '--ignore=D001'] | ||
exclude: ^.*\/CHANGELOG\.rst/.*$ |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -50,4 +50,4 @@ matrix: | |
- .wordlist.txt | ||
|
||
pipeline: | ||
- pyspelling.filters.xml | ||
- pyspelling.filters.xml |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -117,4 +117,6 @@ Delicat | |
Jakub | ||
Bence | ||
Palacios | ||
env | ||
env | ||
pids | ||
pgrep |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,4 +3,4 @@ project(rosbot) | |
|
||
find_package(ament_cmake REQUIRED) | ||
|
||
ament_package() | ||
ament_package() |
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
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
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
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
Oops, something went wrong.