Merge pull request #593 from Avaiga/gmarabout/add_subprocess_initiali… #762
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, dev/*, release/* ] | |
pull_request: | |
branches: [ develop, dev/*, release/* ] | |
jobs: | |
backend: | |
timeout-minutes: 40 | |
strategy: | |
fail-fast: false | |
matrix: | |
python-versions: ['3.8', '3.9', '3.10', '3.11'] | |
os: [ubuntu-latest, windows-latest, macos-latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-versions }} | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: '20' | |
- name: install libmagic on macos | |
if: matrix.os == 'macos-latest' | |
run: brew install libmagic | |
- name: Tests | |
if: matrix.os != 'windows-latest' || matrix.python-versions != '3.8' | |
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 |