Skip to content

Revive action primitives examples and tests #2735

Revive action primitives examples and tests

Revive action primitives examples and tests #2735

Workflow file for this run

name: Tests
on:
pull_request:
push:
branches:
- og-develop
- main
concurrency:
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}
cancel-in-progress: true
jobs:
run_test:
name: Run Tests
runs-on: [self-hosted, linux, gpu, dataset-enabled]
strategy:
fail-fast: false
matrix:
test_file:
- test_controllers
- test_data_collection
- test_dump_load_states
- test_envs
- test_multiple_envs
- test_object_removal
- test_object_states
- test_primitives
- test_robot_states_flatcache
- test_robot_states_no_flatcache
- test_robot_teleoperation
- test_scene_graph
- test_sensors
- test_symbolic_primitives
- test_systems
- test_transform_utils
- test_transition_rules
defaults:
run:
shell: micromamba run -n omnigibson /bin/bash -leo pipefail {0}
steps:
- name: Checkout source
uses: actions/checkout@v2
with:
submodules: true
path: omnigibson-src
- name: Install dev requirements
working-directory: omnigibson-src
run: pip install -r requirements-dev.txt
- name: Install
working-directory: omnigibson-src
run: pip install -e .
- name: Run tests
working-directory: omnigibson-src
run: pytest -s tests/${{ matrix.test_file }}.py --junitxml=${{ matrix.test_file }}.xml && cp ${{ matrix.test_file }}.xml ${GITHUB_WORKSPACE}/
continue-on-error: true
- name: Deploy artifact
uses: actions/upload-artifact@v3
with:
name: ${{ github.run_id }}-tests-${{ matrix.test_file }}
path: ${{ matrix.test_file }}.xml
- name: Check for failures or errors
run: |
if grep -Eq 'failures="[1-9][0-9]*"|errors="[1-9][0-9]*"' ${{ matrix.test_file }}.xml; then
exit 1
else
exit 0
fi
upload_report:
name: Compile Report
runs-on: [self-hosted, linux]
defaults:
run:
shell: micromamba run -n omnigibson /bin/bash -leo pipefail {0}
needs: [run_test]
steps:
- name: Checkout source
uses: actions/checkout@v2
with:
submodules: true
path: omnigibson-src
- name: Pull reports
uses: actions/download-artifact@v3
with:
path: omnigibson-src
- name: Test Report0
uses: dorny/test-reporter@v1
with:
name: Test Results
working-directory: omnigibson-src
path: ${{ github.run_id }}-tests-*/test_*.xml
reporter: java-junit
fail-on-error: 'true'
fail-on-empty: 'true'
# - name: Upload coverage to Codecov
# uses: codecov/[email protected]
# with:
# token: ${{ secrets.CODECOV_TOKEN }}