E2E Tests #389
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: E2E Tests | |
permissions: | |
contents: read | |
on: | |
schedule: | |
- cron: "0 8 * * mon-fri" | |
workflow_dispatch: | |
pull_request: | |
paths: | |
- "e2e_tests/**" | |
workflow_call: | |
secrets: | |
E2E_API_KEY: | |
required: true | |
E2E_ENVIRONMENT: | |
required: true | |
E2E_TEAM: | |
required: true | |
jobs: | |
e2e: | |
name: End to End Testing | |
permissions: | |
contents: read | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ["3.10"] | |
poetry-version: ["1.3.1"] | |
os: [ubuntu-latest, windows-latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Harden Runner | |
uses: step-security/harden-runner@5c7944e73c4c2a096b17a9cb74d65b6c2bbafbde # v2.9.1 | |
with: | |
egress-policy: audit | |
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | |
- uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Upgrade pip | |
run: python -m pip install --upgrade pip | |
- name: Setup Poetry | |
uses: abatilo/actions-poetry@c31426b23a8080795905ec73c9e458a2447cb2f2 | |
with: | |
poetry-version: ${{ matrix.poetry-version }} | |
- name: Install dependencies | |
run: | | |
poetry install --no-interaction --no-root --all-extras -vvv | |
pip install wheel | |
pip install --upgrade setuptools | |
pip install --editable ".[test,ml,medical,dev,ocv]" | |
pip install pytest | |
- name: Run Tests | |
run: python -m pytest e2e_tests --reruns 3 --reruns-delay 10 -W ignore::DeprecationWarning | |
env: | |
E2E_API_KEY: ${{ secrets.E2E_API_KEY }} | |
E2E_ENVIRONMENT: ${{ secrets.E2E_ENVIRONMENT }} | |
E2E_TEAM: ${{ secrets.E2E_TEAM }} | |
slack-notifier: | |
name: Slack Notifier Bot | |
needs: e2e | |
if: failure() && github.event_name == 'schedule' | |
permissions: | |
contents: read | |
uses: ./.github/workflows/JOB_slack_message.yml | |
with: | |
message: | | |
*Nightly E2E run failed* | |
:link: | |
- https://github.com/v7labs/darwin-py/actions/runs/${{ github.run_id }} | |
:warning: ${{ github.workflow }} failed. | |
icon: ":warning:" | |
at_team: true | |
secrets: inherit |