diff --git a/.github/workflows/merge_check.yaml b/.github/workflows/merge_check.yaml new file mode 100644 index 00000000000..31347b90735 --- /dev/null +++ b/.github/workflows/merge_check.yaml @@ -0,0 +1,49 @@ +name: Merge Checks + +on: + merge_group: + branches: + - develop + workflow_dispatch: # run on request (no need for PR) + +# Declare default permissions as read only. +permissions: read-all + +jobs: + Integration-Test: + runs-on: [otx-gpu-a10g-1] + container: + image: 219678651685.dkr.ecr.eu-west-1.amazonaws.com/ote-ci:11.7.1.2-devel-ubuntu20.04 + options: "--runtime=nvidia --env-file=/home/runner/.nvidia.env --ipc=host" + strategy: + fail-fast: false + matrix: + include: + - task: "action" + - task: "multi_classification" + - task: "hlabel_classification" + - task: "detection" + - task: "instance_segmentation" + - task: "semantic_segmentation" + - task: "visual_prompting" + - task: "anomaly" + name: Integration-Test-${{ matrix.task }}-py310 + # This is what will cancel the job concurrency + concurrency: + group: ${{ github.workflow }}-Integration-${{ github.event.pull_request.number || github.ref }}-${{ matrix.task }} + cancel-in-progress: true + steps: + - name: Checkout repository + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + - name: Install Python + uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0 + with: + python-version: "3.10" + - name: Install tox + run: | + python -m pip install --require-hashes --no-deps -r .ci/requirements.txt + pip-compile --generate-hashes --output-file=/tmp/requirements.txt --extra=ci_tox pyproject.toml + python -m pip install --require-hashes --no-deps -r /tmp/requirements.txt + rm /tmp/requirements.txt + - name: Run Integration Test + run: tox -vv -e integration-test-${{ matrix.task }} diff --git a/.github/workflows/pre_merge.yaml b/.github/workflows/pre_merge.yaml index 4ac64589939..81c615fa334 100644 --- a/.github/workflows/pre_merge.yaml +++ b/.github/workflows/pre_merge.yaml @@ -10,6 +10,9 @@ on: - opened - reopened - synchronize + merge_group: + branches: + - develop workflow_dispatch: # run on request (no need for PR) # Declare default permissions as read only. @@ -89,38 +92,3 @@ jobs: curl -Os https://uploader.codecov.io/latest/linux/codecov chmod +x codecov ./codecov -t ${{ secrets.CODECOV_TOKEN }} --sha $COMMIT_ID -U $HTTP_PROXY -f .tox/coverage_unit-test-${{ matrix.tox-env }}.xml -F ${{ matrix.tox-env }} - - # Integration-Test: - # runs-on: [self-hosted, linux, x64, dev] - # needs: Unit-Test - # strategy: - # fail-fast: false - # matrix: - # include: - # - task: "action" - # - task: "classification" - # - task: "detection" - # - task: "instance_segmentation" - # - task: "semantic_segmentation" - # - task: "visual_prompting" - # - task: "anomaly" - # name: Integration-Test-${{ matrix.task }}-py310 - # # This is what will cancel the job concurrency - # concurrency: - # group: ${{ github.workflow }}-Integration-${{ github.event.pull_request.number || github.ref }}-${{ matrix.task }} - # cancel-in-progress: true - # steps: - # - name: Checkout repository - # uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - # - name: Install Python - # uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0 - # with: - # python-version: "3.10" - # - name: Install tox - # run: | - # python -m pip install --require-hashes --no-deps -r .ci/requirements.txt - # pip-compile --generate-hashes --output-file=/tmp/requirements.txt --extra=ci_tox pyproject.toml - # python -m pip install --require-hashes --no-deps -r /tmp/requirements.txt - # rm /tmp/requirements.txt - # - name: Run Integration Test - # run: tox -vv -e integration-test-${{ matrix.task }} diff --git a/tests/integration/conftest.py b/tests/integration/conftest.py index 30aabd493d3..6c782b8e999 100644 --- a/tests/integration/conftest.py +++ b/tests/integration/conftest.py @@ -42,6 +42,10 @@ def find_recipe_folder(base_path: Path, folder_name: str) -> Path: def get_task_list(task: str) -> list[OTXTaskType]: if task == "all": return [task_type for task_type in OTXTaskType if task_type != OTXTaskType.DETECTION_SEMI_SL] + if task == "multi_classification": + return [OTXTaskType.MULTI_CLASS_CLS, OTXTaskType.MULTI_LABEL_CLS] + if task == "hlabel_classification": + return [OTXTaskType.H_LABEL_CLS] if task == "classification": return [OTXTaskType.MULTI_CLASS_CLS, OTXTaskType.MULTI_LABEL_CLS, OTXTaskType.H_LABEL_CLS] if task == "action": diff --git a/tox.ini b/tox.ini index 9e9683c4358..bf0cba526df 100644 --- a/tox.ini +++ b/tox.ini @@ -12,6 +12,8 @@ task = all: "all" action: "action" classification: "classification" + multi_classification: "multi_classification" + hlabel_classification: "hlabel_classification" detection: "detection" rotated_detection: "rotated_detection" instance_segmentation: "instance_segmentation" @@ -46,7 +48,7 @@ commands = {posargs} -[testenv:integration-test-{all, action, classification, detection, rotated_detection, instance_segmentation, semantic_segmentation, visual_prompting, anomaly}] +[testenv:integration-test-{all, action, classification, multi_classification, hlabel_classification, detection, rotated_detection, instance_segmentation, semantic_segmentation, visual_prompting, anomaly}] setenv = CUBLAS_WORKSPACE_CONFIG=:4096:8 deps =