From 780a46e1b5e3dc7d62860458c76a6c9b55ea3d80 Mon Sep 17 00:00:00 2001 From: workingloong Date: Wed, 1 Jan 2025 20:22:40 +0800 Subject: [PATCH 1/4] Rename workflow to code check. --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 97e8f0e9b..339667977 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,5 +1,5 @@ --- -name: main test for the project +name: code check on: pull_request: From ff1ee24939b004c2d9a4cadc5b4be15795494c6d Mon Sep 17 00:00:00 2001 From: workingloong Date: Wed, 1 Jan 2025 21:08:00 +0800 Subject: [PATCH 2/4] set codecov --- .github/workflows/main.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 339667977..c58d0f478 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -32,10 +32,11 @@ jobs: # This step references the directory that contains the action. - name: RUN pytest uses: ./.github/actions/dlrover-python-test - - name: Upload coverage reports to Codecov - uses: codecov/codecov-action@v4.0.1 + - name: Upload test results to Codecov + if: ${{ !cancelled() }} + uses: codecov/test-results-action@v1 with: - token: 043586e5-68b8-4588-9bf4-c333f2692345 + token: ${{ secrets.CODECOV_TOKEN }} slug: intelligent-machine-learning/dlrover operator-test: runs-on: ubuntu-latest From 640b0010f7a62d93cd8f25c29f3ace99e3232f1a Mon Sep 17 00:00:00 2001 From: workingloong Date: Wed, 1 Jan 2025 21:15:50 +0800 Subject: [PATCH 3/4] test codecov --- .github/actions/dlrover-python-test/action.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/actions/dlrover-python-test/action.yml b/.github/actions/dlrover-python-test/action.yml index c4530d968..965a84dfb 100644 --- a/.github/actions/dlrover-python-test/action.yml +++ b/.github/actions/dlrover-python-test/action.yml @@ -10,5 +10,6 @@ runs: - "sh scripts/ci_install.sh && python -m grpc_tools.protoc -I. \ dlrover/proto/*.proto --python_out=. --grpc_python_out=. \ && ROLE_NAME=dlrover-trainer \ -python -m pytest --durations=10 dlrover/python/tests dlrover/trainer/tests \ +python -m pytest --cov --junitxml=junit.xml -o junit_family=legacy --durations=10 \ +dlrover/python/tests/test_job_manager.py dlrover/trainer/tests/torch/elastic_test.py \ --cov-report xml --cov=dlrover " From 4e6d65add1143f555eca06109f4f8eb931860458 Mon Sep 17 00:00:00 2001 From: workingloong Date: Wed, 1 Jan 2025 21:23:08 +0800 Subject: [PATCH 4/4] Set the token in the main.yml --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index c58d0f478..f6bc91a3b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -36,7 +36,7 @@ jobs: if: ${{ !cancelled() }} uses: codecov/test-results-action@v1 with: - token: ${{ secrets.CODECOV_TOKEN }} + token: 3b0503fb-7c5e-4486-9ddf-2903deb77067 slug: intelligent-machine-learning/dlrover operator-test: runs-on: ubuntu-latest