tests #276
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
name: tests | |
on: | |
# Run action on certain pull request events | |
pull_request: | |
types: [opened, synchronize, reopened, ready_for_review] | |
# Nightly job on default (main) branch | |
schedule: | |
- cron: '0 0 * * *' | |
# Ensures that only one workflow runs at a time for this branch | |
concurrency: | |
group: ${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
# Pure Python testing | |
python-test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v3 | |
with: | |
python-version: '3.10' | |
- name: Install dependencies | |
run: | | |
python3 -m pip install --upgrade pip | |
pip3 install -e pyrobosim | |
pip3 install -r test/python_test_requirements.txt | |
setup/setup_pddlstream.bash | |
- name: Run unit tests | |
run: | | |
export PYTHONPATH=./dependencies/pddlstream:$PYTHONPATH | |
test/run_tests.bash | |
- name: Upload test results | |
uses: actions/upload-artifact@v3 | |
with: | |
name: test-results | |
path: test/results/ | |
# Always publish test results even when there are failures. | |
if: ${{ always() }} | |
# Testing with ROS 2 | |
ros2-test: | |
strategy: | |
matrix: | |
ros_distro: [humble, iron, rolling] | |
env: | |
ROS_DISTRO: ${{ matrix.ros_distro }} | |
name: ros-${{ matrix.ros_distro }}-test | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v3 | |
- name: Run unit tests in Docker container | |
run: docker compose run test | |
- name: Upload test results | |
uses: actions/upload-artifact@v3 | |
with: | |
name: test-results-${{ matrix.ros_distro }} | |
path: test/results/ | |
# Always publish test results even when there are failures. | |
if: ${{ always() }} |