install_dojo_on_unsupported_python_version #218
This file contains hidden or 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: 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 |