-
Notifications
You must be signed in to change notification settings - Fork 59
112 lines (99 loc) · 3.08 KB
/
tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
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_curobo
- 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@v4
with:
submodules: true
- name: Install
run: pip install -e .[dev,primitives] --no-build-isolation
- name: Print env
run: printenv
- name: Run tests
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/codecov-action@v2.1.0
# with:
# token: ${{ secrets.CODECOV_TOKEN }}