Skip to content

Commit

Permalink
stable exit
Browse files Browse the repository at this point in the history
  • Loading branch information
dipinknair committed Nov 4, 2024
1 parent a97e4f8 commit da3effd
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion .github/workflows/ci_cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,20 @@ jobs:
else
echo "matrix={\"mechanical-version\":['${{ needs.revn-variations.outputs.test_docker_image_version }}'],\"experimental\":[false]}" >> $GITHUB_OUTPUT
fi
container-stability-check:
runs-on: ubuntu-latest
needs: [revn-variations]
steps:
- name: Check Container Stability
run: |
apt update
apt install bc -y
CONTAINER_VERSION=$(echo "${{ needs.revn-variations.outputs.test_docker_image_version }}" | grep -o -E '[0-9]+(\.[0-9]+)?' | head -n 1)
if (( $(echo "$CONTAINER_VERSION > 24.2" | bc -l) )); then
echo "CONTAINER_STABLE_EXIT=true" >> $GITHUB_ENV
else
echo "CONTAINER_STABLE_EXIT=false" >> $GITHUB_ENV
fi
remote-connect:
name: Remote connect testing and coverage - Mechanical ${{ matrix.mechanical-version }}
Expand Down Expand Up @@ -304,7 +318,11 @@ jobs:
PYTHONUNBUFFERED: 1
run: |
. /env/bin/activate
xvfb-run mechanical-env pytest -m embedding -s --junitxml test_results${{ matrix.python-version }}.xml || true
if [ "${{ env.CONTAINER_STABLE_EXIT }}" == "true" ]; then
xvfb-run mechanical-env pytest -m embedding -s --junitxml test_results${{ matrix.python-version }}.xml || true
else
xvfb-run mechanical-env pytest -m embedding -s --junitxml test_results${{ matrix.python-version }}.xml
fi
- name: Upload coverage results
uses: actions/upload-artifact@v4
Expand Down

0 comments on commit da3effd

Please sign in to comment.