Skip to content

use env var in ci

use env var in ci #91

Workflow file for this run

name: CI standalone
defaults:
run:
shell: bash -ieo pipefail {0}
on:
push:
branches:
- test-ci
pull_request:
branches:
- master
- devel
workflow_dispatch:
inputs:
logLevel:
description: 'Log level'
required: true
default: 'info'
type: choice
options:
- info
- warning
- debug
tags:
description: 'Test scenario tags'
required: false
type: boolean
jobs:
Build_and_run_Tests:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
with:
path: 'ros_ws/src/pycram'
repository: $GITHUB_REPOSITORY
ref: $GITHUB_REF_NAME
submodules: recursive
- name: Checkout iai_maps
uses: actions/checkout@v3
with:
path: 'ros_ws/src/iai_maps'
repository: code-iai/iai_maps
ref: master
- name: Checkout iai_robots
uses: actions/checkout@v3
with:
path: 'ros_ws/src/iai_robots'
repository: code-iai/iai_robots
ref: master
- name: Checkout pr2_common
uses: actions/checkout@v3
with:
path: 'ros_ws/src/pr2_common'
repository: PR2/pr2_common
ref: master
- name: Checkout kdl_ik_service
uses: actions/checkout@v3
with:
path: 'ros_ws/src/kdl_ik_service'
repository: cram2/kdl_ik_service
ref: master
- name: Checkout pr2_kinematics
uses: actions/checkout@v3
with:
path: 'ros_ws/src/pr2_kinematics'
repository: PR2/pr2_kinematics
ref: kinetic-devel
- name: install ros and deps
uses: betwo/github-setup-catkin@master
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
with:
# Version range or exact version of ROS version to use, using SemVer's version range syntax.
ros-version: noetic
build-tool: 'catkin_tools'
# Root directory of the catkin workspace
workspace: $GITHUB_WORKSPACE/ros_ws
- name: build and source workspace
run: |
cd ros_ws
catkin_make
echo 'export ROS_HOSTNAME=localhost' >> ~/.bashrc
echo 'source $GITHUB_WORKSPACE/ros_ws/devel/setup.bash' >> ~/.bashrc
- name: Install requirements
run: |
cd $GITHUB_WORKSPACE/ros_ws/src/pycram
sudo pip3 install -r requirements.txt
- name: upgrade numpy
run: |
sudo pip3 install --upgrade numpy
- name: install pytest
run: |
sudo pip3 install pytest
- name: print base_ref
run : |
echo $GITHUB_REPOSITORY
echo $GITHUB_REF_NAME
- name: start roscore
run: |
roslaunch pycram ik_and_description.launch &
- name: Run Tests
run: |
roscd pycram
#python3 ci_test.py
pytest -v test
#python3 -m unittest discover -v test
#cd test
#python3 -m unittest -v test_action_designator
#python3 -m unittest -v local_transformer_tests
#python3 -m unittest -v test_bullet_world
## python3 -m unittest -v test_bullet_world_reasoning
#python3 -m unittest -v test_costmaps
#python3 -m unittest -v test_database_resolver
#python3 -m unittest -v test_giskard
#python3 -m unittest -v test_jpt_resolver
#echo "test_location_designator"
## python3 -m unittest -v test_location_designator
#python3 -m unittest -v test_object_designator
#python3 -m unittest -v test_orm
#python3 -m unittest -v test_pose
#python3 -m unittest -v test_task_tree