Skip to content

Commit

Permalink
Update pre-merge workflow to use Ubuntu 24.04 and simplify unit test …
Browse files Browse the repository at this point in the history
…coverage reporting
  • Loading branch information
eugene123tw committed Jan 14, 2025
1 parent bf4eabe commit a1e3795
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 25 deletions.
20 changes: 1 addition & 19 deletions .github/workflows/pre_merge.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ jobs:
Intense-Unit-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
image: "ubuntu:24.04"
needs: Code-Quality-Checks
timeout-minutes: 120
strategy:
Expand All @@ -114,24 +114,6 @@ jobs:
rm /tmp/requirements.txt
- name: Run unit test
run: tox -vv -e intense-unit-test-${{ matrix.tox-env }}
- name: Upload coverage reports to Codecov
run: |
# If the workflow is triggered from PR then it gets the commit id from the PR.
# else it uses the commit id of the latest commit. This is because the commit
# of the checked-out branch/commit does not exist in the tree as it is grafted.
# Also note: GitHub does not pass secrets to pipelines triggered from a fork.
# This means that upload will fail for PRs from forks.
if [ -n "${{ github.event.pull_request.head.sha }}" ]
then
COMMIT_ID=${{ github.event.pull_request.head.sha }}
else
COMMIT_ID=${{ github.sha }}
fi
# current version of codecov-action does not support uploading reports through the proxy
# so we use the latest version of codecov uploader binary
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_intense-unit-test-${{ matrix.tox-env }}.xml -F ${{ matrix.tox-env }}
Integration-Test:
if: |
github.event.pull_request.draft == false &&
Expand Down
7 changes: 1 addition & 6 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,7 @@ deps =
.[base,dev]
commands =
; Run Unit-Test with coverage report.
pytest -m "intense" tests/unit \
--cov=otx \
--cov-report=xml:{toxworkdir}/coverage_{envname}.xml \
--cov-report=term-missing \
--cov-fail-under=0 \
{posargs}
pytest -m "intense" tests/unit {posargs}


[testenv:integration-test-{all, action, classification, multi_cls_classification, multi_label_classification, hlabel_classification, detection, rotated_detection, keypoint_detection, instance_segmentation, semantic_segmentation, visual_prompting_all, visual_prompting, zero_shot_visual_prompting, anomaly, anomaly_classification, anomaly_detection, anomaly_segmentation, object_detection_3d}]
Expand Down

0 comments on commit a1e3795

Please sign in to comment.