This repository has been archived by the owner on Jan 2, 2024. It is now read-only.
Add job page to scenario mgt template (#34) #89
This file contains 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: Python tests | |
on: | |
push: | |
branches: [ develop ] | |
pull_request: | |
branches: [ develop ] | |
jobs: | |
backend: | |
timeout-minutes: 40 | |
strategy: | |
matrix: | |
python-versions: ['3.8', '3.9', '3.10', '3.11'] | |
os: [ubuntu-latest, windows-latest, macos-latest] | |
fail-fast: false | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-versions }} | |
- name: Tests | |
run: | | |
pip install tox | |
tox -e tests | |
- name: Notify user if failed | |
if: failure() && github.event_name == 'workflow_dispatch' | |
run: | | |
if [[ -n "${{ github.event.inputs.user-to-notify }}" ]]; then | |
curl "${{ secrets.notify_endpoint }}" -d '{"username": "${{ github.event.inputs.user-to-notify }}", "url": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" }' -H "Content-Type: application/json" | |
fi | |
shell: bash |