@@ -75,18 +75,25 @@ jobs:
7575 PROGRAM_FOLDER : ' tests/resources/dockerursim/programs/polyscopex'
7676 - ROBOT_MODEL : ' ur7e'
7777 URSIM_VERSION : ' 10.13.0'
78- PROGRAM_FOLDER : ' tests/resources/dockerursim/programs/polyscopex'
78+ PROGRAM_FOLDER : ' tests/resources/dockerursim/programs/polyscopex/10.13.0/ur7e'
79+ POLYSCOPE_X_WITH_REMOTE_CONTROL : ' true'
80+ CITADEL_DB_FOLDER : ' tests/resources/dockerursim/citadelDB'
7981
8082 steps :
8183 - uses : actions/checkout@v7
8284 - name : start ursim
8385 run : |
84- scripts/start_ursim.sh -m $ROBOT_MODEL -v $URSIM_VERSION -p $PROGRAM_FOLDER -d -f DISABLED
86+ CITADEL_DB_ARG=""
87+ if [ -n "$CITADEL_DB_FOLDER" ]; then
88+ CITADEL_DB_ARG="-c $CITADEL_DB_FOLDER"
89+ fi
90+ scripts/start_ursim.sh -m $ROBOT_MODEL -v $URSIM_VERSION -p $PROGRAM_FOLDER $CITADEL_DB_ARG -d -f DISABLED
8591 env :
8692 DOCKER_RUN_OPTS : --network ursim_net
8793 ROBOT_MODEL : ${{matrix.env.ROBOT_MODEL}}
8894 URSIM_VERSION : ${{matrix.env.URSIM_VERSION}}
8995 PROGRAM_FOLDER : ${{matrix.env.PROGRAM_FOLDER}}
96+ CITADEL_DB_FOLDER : ${{matrix.env.CITADEL_DB_FOLDER || ''}}
9097 - id : check_polyscopex
9198 run : |
9299 if [[ "${{matrix.env.URSIM_VERSION}}" == "10."* ]]; then
@@ -103,18 +110,27 @@ jobs:
103110 - name : Extract CMake build directory
104111 run : tar -xzf build.tar.gz
105112 - name : Create folder for test artifacts
106- run : mkdir -p test_artifacts
113+ run : mkdir -p test_artifacts/screenshots
107114 - name : Access PolyScope
108115 if : ${{ steps.check_polyscopex.outputs.is_polyscopex == 'true' }}
109116 run : chrome --no-sandbox --disable-settuid-sandbox --headless=new 192.168.56.101 &
117+ - name : Setup Python
118+ uses : actions/setup-python@v5
119+ with :
120+ python-version : ' 3.x'
110121 - name : Install Python dependencies
111- run : sudo apt-get update && sudo apt-get install -y python3-pandas python3-lxml
122+ run : pip install pandas lxml
123+ - name : Install Playwright for PolyScope X screenshots
124+ if : ${{ steps.check_polyscopex.outputs.is_polyscopex == 'true' }}
125+ run : pip install playwright && playwright install chromium
112126 - name : Generate rtde outputs lists
113127 run : python3 tests/resources/generate_rtde_outputs.py
114128 - name : test
115129 run : cd build && ctest --output-on-failure --output-junit junit.xml
116130 env :
117131 URSIM_VERSION : ${{matrix.env.URSIM_VERSION}}
132+ POLYSCOPE_X_TESTS_WITH_REMOTE_CONTROL : ${{matrix.env.POLYSCOPE_X_WITH_REMOTE_CONTROL || ''}}
133+ POLYSCOPE_X_SCREENSHOT_DIR : ${{github.workspace}}/test_artifacts/screenshots
118134 - name : Upload test results to Codecov
119135 uses : codecov/codecov-action@v7
120136 with :
@@ -168,6 +184,25 @@ jobs:
168184 path : test_artifacts
169185 if-no-files-found : error
170186 retention-days : 10
187+ - name : Capture PolyScope X URSim logs
188+ if : ${{ always() && steps.check_polyscopex.outputs.is_polyscopex == 'true' }}
189+ run : docker logs ursim > test_artifacts/ursim_docker.log 2>&1
190+ - name : Upload PolyScope X URSim logs
191+ uses : actions/upload-artifact@v7
192+ if : ${{ always() && steps.check_polyscopex.outputs.is_polyscopex == 'true' }}
193+ with :
194+ name : ${{matrix.env.ROBOT_MODEL}}_${{matrix.env.URSIM_VERSION}}_URSim_Logs
195+ path : test_artifacts/ursim_docker.log
196+ if-no-files-found : error
197+ retention-days : 10
198+ - name : Upload PolyScope X screenshots
199+ uses : actions/upload-artifact@v7
200+ if : ${{ failure() && steps.check_polyscopex.outputs.is_polyscopex == 'true' }}
201+ with :
202+ name : ${{matrix.env.ROBOT_MODEL}}_${{matrix.env.URSIM_VERSION}}_screenshots
203+ path : test_artifacts/screenshots
204+ if-no-files-found : ignore
205+ retention-days : 10
171206 - name : Upload generated scripts
172207 uses : actions/upload-artifact@v6
173208 if : ${{ always() }}
0 commit comments