Skip to content

Merge pull request #233 from LucaKro/pr2_ft_sensor #39

Merge pull request #233 from LucaKro/pr2_ft_sensor

Merge pull request #233 from LucaKro/pr2_ft_sensor #39

Workflow file for this run

name: pycram_docker_ci
defaults:
run:
shell: bash -ieo pipefail {0}
on:
push:
branches:
- dev
- master
pull_request:
branches:
- master
- dev
workflow_dispatch: # For manual debugging
inputs:
debug_enabled:
type: boolean
required: false
default: false
description: "Run tmate session"
jobs:
build_and_run_tests:
runs-on: ubuntu-20.04
container:
image: "pycram/pycram:dev"
steps:
- name: Checkout PyCRAM
uses: actions/checkout@v3
with:
path: "ros/src/pycram"
repository: ${{ github.repository }}
ref: ${{ github.ref }}
submodules: "recursive"
# For debugging
- name: Setup tmate session
uses: mxschmitt/action-tmate@v3
if: ${{ github.event_name == 'workflow_dispatch' && inputs.debug_enabled }}
- name: Update PyCRAM source files
run: |
rm -rf /opt/ros/overlay_ws/src/pycram/*
cd /opt/ros/overlay_ws/src/pycram
rm -rf .git .github .gitignore .gitmodules .readthedocs.yaml
cp -r /__w/${{ github.event.repository.name }}/${{ github.event.repository.name }}/ros/src/pycram /opt/ros/overlay_ws/src
- name: Remake workspace & start roscore
run: |
sudo -s
source /opt/ros/noetic/setup.bash
cd /opt/ros/overlay_ws
catkin_make
source /opt/ros/overlay_ws/devel/setup.bash
roslaunch pycram ik_and_description.launch &
- name: Install python dependencies
run: |
pip3 install --upgrade pip --root-user-action=ignore
cd /opt/ros/overlay_ws/src/pycram
pip3 install -r requirements.txt
sudo apt-get install -y libpq-dev
pip3 install -r requirements-resolver.txt
- name: Install pytest & pyjpt
run: |
pip3 install --ignore-installed pytest pyjpt
- name: Run tests
run: |
source /opt/ros/overlay_ws/devel/setup.bash
roscd pycram
pytest -v test
- name: Run Demos
run: |
source /opt/ros/overlay_ws/devel/setup.bash
roscd pycram
python3 demos/pycram_bullet_world_demo/test_demo.py