Skip to content

install_dojo_on_unsupported_python_version #218

install_dojo_on_unsupported_python_version

install_dojo_on_unsupported_python_version #218

name: install_dojo_on_unsupported_python_version
on:
push:
branches: [ main ]
schedule:
- cron: '0 0 */1 * *' # Runs at midnight every 1 days
workflow_dispatch:
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-14] # Operating systems
python-version: ['3.8', '3.9', '3.13'] # Python versions
timeout-minutes: 60
steps:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Try pip install
id: check_install
continue-on-error: true
run: |
pip cache purge
pip install dojo-compass
if [ $? -eq 0 ]; then
echo "pip install succeeded, failing the workflow."
echo "::set-output name=install_worked::true" # Set as output for this step
else
echo "pip install failed, passing the workflow."
fi
- name: Send failure notification to AllQuiet
if: steps.check_install.outputs.install_worked == 'true'
run: |
curl ${{ secrets.ALLQUIET_URL }} \
-H "Content-Type: application/json" \
--data '{"alertName":"${{ github.repository }} workflow ${{ github.workflow }} failed!","alertStatus":"Warning"}'
exit 1