Skip to content

Commit

Permalink
Workflow + pre commit
Browse files Browse the repository at this point in the history
  • Loading branch information
rafal-gorecki committed Oct 25, 2023
1 parent 6c0a865 commit 91c8be7
Show file tree
Hide file tree
Showing 6 changed files with 39 additions and 44 deletions.
15 changes: 0 additions & 15 deletions .github/workflows/black.yaml

This file was deleted.

17 changes: 9 additions & 8 deletions .github/workflows/bump_version.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
name: Trigger rosbot-docker to build an image and bump version

name: Bump version
on:
workflow_dispatch:
inputs:
Expand All @@ -13,10 +12,14 @@ on:
types: [closed]

jobs:
industrial_ci:
name: Industrial CI
uses: ./.github/workflows/industrial_ci.yaml

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
runs-on: ubuntu-latest
needs: industrial_ci
outputs:
bump: ${{ env.BUMP }}
steps:
Expand All @@ -30,9 +33,8 @@ jobs:
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
runs-on: ubuntu-latest
needs: get-bump
outputs:
new_version: ${{ steps.catkin-release.outputs.new_version }}
Expand All @@ -49,9 +51,8 @@ jobs:
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
runs-on: ubuntu-latest
needs: catkin-release
steps:
- name: trigger the endpoint
Expand Down
27 changes: 25 additions & 2 deletions .github/workflows/industrial_ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,33 @@
name: Industrial CI
on:
workflow_call:
workflow_dispatch:
push:


jobs:
industrial_ci:
black:
name: Black
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: psf/black@stable
with:
options: --line-length=99

spellcheck:
name: Spellcheck
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: rojopolis/[email protected]
name: Spellcheck

ros_industrial_ci:
name: ROS Industrial CI
needs:
- black
- spellcheck
strategy:
fail-fast: false
matrix:
Expand All @@ -15,7 +38,7 @@ jobs:
- 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
run: python3 -m pip install -U vcstool && vcs import . < ./rosbot_xl/rosbot_xl_hardware.repos && vcs import . < ./rosbot_xl/rosbot_xl_simulation.repos
- uses: ros-industrial/industrial_ci@master
env:
ROS_DISTRO: ${{matrix.ROS_DISTRO}}
15 changes: 0 additions & 15 deletions .github/workflows/spellcheck.yaml

This file was deleted.

7 changes: 4 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,17 @@ repos:
files: ^.github|./\.yaml

- repo: https://github.com/psf/black
rev: 22.12.0
rev: 23.10.1
hooks:
- id: black
args: ["--line-length=99"]
args: ["--line-length=99", "--experimental-string-processing"]

- repo: https://github.com/PyCQA/flake8
rev: 6.1.0
hooks:
- id: flake8
args: ["--ignore=E501"] # ignore too long line, black checks it
args: ["--ignore=E501,W503"] # ignore too long line and line break before binary operator,
# black checks it

- repo: local
hooks:
Expand Down
2 changes: 1 addition & 1 deletion rosbot_gazebo/launch/simulation.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def generate_launch_description():
declare_headless_arg = DeclareLaunchArgument(
"headless",
default_value="False",
description=("Run Gazebo Ignition in the headless mode"),
description="Run Gazebo Ignition in the headless mode",
)

headless_cfg = PythonExpression(
Expand Down

0 comments on commit 91c8be7

Please sign in to comment.