Trigger volumes #2999
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: | |
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 | |
working-directory: omnigibson-src | |
run: pip install -e .[dev] | |
- name: Print env | |
run: printenv | |
- 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, errors, or missing XML | |
run: | | |
if [ ! -f ${{ matrix.test_file }}.xml ]; then | |
echo "Error: XML file not found, probably due to segfault" | |
exit 1 | |
elif grep -Eq 'failures="[1-9][0-9]*"|errors="[1-9][0-9]*"' ${{ matrix.test_file }}.xml; then | |
echo "Error: Test failures or errors found" | |
exit 1 | |
else | |
echo "All tests passed successfully" | |
exit 0 | |
fi | |
upload_report: | |
name: Compile Report | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
shell: micromamba run -n omnigibson /bin/bash -leo pipefail {0} | |
needs: [run_test] | |
if: always() | |
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: 'false' | |
fail-on-empty: 'false' | |
# - name: Upload coverage to Codecov | |
# uses: codecov/[email protected] | |
# with: | |
# token: ${{ secrets.CODECOV_TOKEN }} |