overall-tests.yml 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. name: Overall Test Workflow
  2. on:
  3. pull_request_review:
  4. types: [submitted]
  5. jobs:
  6. tests:
  7. if: github.event.review.state == 'approved'
  8. timeout-minutes: 40
  9. strategy:
  10. fail-fast: false
  11. matrix:
  12. python-version: ['3.8', '3.9', '3.10', '3.11']
  13. os: [ubuntu-latest, windows-latest, macos-latest]
  14. runs-on: ${{ matrix.os }}
  15. steps:
  16. - uses: actions/checkout@v4
  17. - uses: actions/setup-python@v5
  18. with:
  19. python-version: ${{matrix.python-version}}
  20. - name: Install pipenv
  21. run: curl https://raw.githubusercontent.com/pypa/pipenv/master/get-pipenv.py | python
  22. - name: Install Dependencies
  23. run: pipenv install --dev --python=${{ matrix.python-version }}
  24. - name: Setup LibMagic (MacOS)
  25. if: matrix.os == 'macos-latest'
  26. run: brew install libmagic
  27. - uses: actions/setup-node@v4
  28. with:
  29. node-version: 20
  30. - name: Frontend Bundle Build
  31. run: pipenv run python tools/frontend/bundle_build.py
  32. - name: Install Playwright
  33. run: pipenv run playwright install chromium --with-deps
  34. - name: Pytest
  35. run: pipenv run pytest -m "not orchestrator_dispatcher and not standalone" --cov=taipy --cov-append --cov-report="xml:overall-coverage.xml" --cov-report term-missing tests
  36. - name: Coverage
  37. if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.11'
  38. uses: MishaKav/pytest-coverage-comment@main
  39. with:
  40. pytest-xml-coverage-path: ./overall-coverage.xml
  41. title: Taipy Overall Coverage Report
  42. - name: Notify user if failed
  43. if: failure() && github.event_name == 'workflow_dispatch'
  44. run: |
  45. if [[ -n "${{ github.event.inputs.user-to-notify }}" ]]; then
  46. 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"
  47. fi
  48. shell: bash