From c3600f0da4505604ec33766f0e29f83be2f1b51b Mon Sep 17 00:00:00 2001 From: Pankaj Date: Tue, 6 Aug 2024 00:46:51 +0530 Subject: [PATCH 1/8] Test CodeCov --- anyscale_provider/operators/anyscale.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/anyscale_provider/operators/anyscale.py b/anyscale_provider/operators/anyscale.py index 98f8923..f76c0b5 100644 --- a/anyscale_provider/operators/anyscale.py +++ b/anyscale_provider/operators/anyscale.py @@ -329,6 +329,10 @@ def on_kill(self) -> None: self.log.info("Termination request received. Submitted request to terminate the anyscale service rollout.") return + @staticmethod + def test_me(): + assert 1 == 1 + def execute(self, context: Context) -> None: """ Execute the service rollout to Anyscale. From 04e1298fbf2785ab3088d2498dd9f6d3368a9147 Mon Sep 17 00:00:00 2001 From: Pankaj Date: Tue, 6 Aug 2024 01:19:17 +0530 Subject: [PATCH 2/8] Fix static check --- anyscale_provider/operators/anyscale.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/anyscale_provider/operators/anyscale.py b/anyscale_provider/operators/anyscale.py index f76c0b5..aae915a 100644 --- a/anyscale_provider/operators/anyscale.py +++ b/anyscale_provider/operators/anyscale.py @@ -330,7 +330,7 @@ def on_kill(self) -> None: return @staticmethod - def test_me(): + def test_me() -> None: assert 1 == 1 def execute(self, context: Context) -> None: From 4191dd86b5ab1a769f1978924ca0d856e902893c Mon Sep 17 00:00:00 2001 From: Pankaj Date: Tue, 6 Aug 2024 01:43:05 +0530 Subject: [PATCH 3/8] Add code cov --- .github/workflows/test.yml | 37 +++++++++++++++++++++++++++++++++++-- 1 file changed, 35 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4bb4d10..f0fc430 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -2,9 +2,9 @@ name: test on: push: - branches: [ "main" ] + branches: [ "main", "test_codecov" ] pull_request: - branches: [ "main" ] + branches: [ "main", "test_codecov" ] concurrency: group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} @@ -111,3 +111,36 @@ jobs: with: name: coverage-integration-test-${{ matrix.python-version }}-${{ matrix.airflow-version }} path: .coverage + + Code-Coverage: + if: github.event.action != 'labeled' + needs: + - Run-Unit-Tests + - Run-Integration-Tests + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + ref: ${{ github.event.pull_request.head.sha || github.ref }} + - name: Set up Python 3.11 + uses: actions/setup-python@v3 + with: + python-version: "3.11" + - name: Install coverage + run: | + pip3 install coverage + - name: Download all coverage artifacts + uses: actions/download-artifact@v2 + with: + path: ./coverage + - name: Combine coverage + run: | + coverage combine ./coverage/coverage*/.coverage + coverage report + coverage xml + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v3 + with: + fail_ci_if_error: true + token: ${{ secrets.CODECOV_TOKEN }} + files: coverage.xml From f7e87a7ea0f089c53e536c8642309e01e831eca6 Mon Sep 17 00:00:00 2001 From: Pankaj Date: Tue, 6 Aug 2024 01:44:24 +0530 Subject: [PATCH 4/8] Add code cov --- .github/workflows/test.yml | 64 +++++++++++++++++++------------------- 1 file changed, 32 insertions(+), 32 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f0fc430..3d5510d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -112,35 +112,35 @@ jobs: name: coverage-integration-test-${{ matrix.python-version }}-${{ matrix.airflow-version }} path: .coverage - Code-Coverage: - if: github.event.action != 'labeled' - needs: - - Run-Unit-Tests - - Run-Integration-Tests - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - with: - ref: ${{ github.event.pull_request.head.sha || github.ref }} - - name: Set up Python 3.11 - uses: actions/setup-python@v3 - with: - python-version: "3.11" - - name: Install coverage - run: | - pip3 install coverage - - name: Download all coverage artifacts - uses: actions/download-artifact@v2 - with: - path: ./coverage - - name: Combine coverage - run: | - coverage combine ./coverage/coverage*/.coverage - coverage report - coverage xml - - name: Upload coverage to Codecov - uses: codecov/codecov-action@v3 - with: - fail_ci_if_error: true - token: ${{ secrets.CODECOV_TOKEN }} - files: coverage.xml + Code-Coverage: + if: github.event.action != 'labeled' + needs: + - Run-Unit-Tests + - Run-Integration-Tests + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + ref: ${{ github.event.pull_request.head.sha || github.ref }} + - name: Set up Python 3.11 + uses: actions/setup-python@v3 + with: + python-version: "3.11" + - name: Install coverage + run: | + pip3 install coverage + - name: Download all coverage artifacts + uses: actions/download-artifact@v2 + with: + path: ./coverage + - name: Combine coverage + run: | + coverage combine ./coverage/coverage*/.coverage + coverage report + coverage xml + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v3 + with: + fail_ci_if_error: true + token: ${{ secrets.CODECOV_TOKEN }} + files: coverage.xml From 3394737a0a50862aff1cb594b630e17f31b72669 Mon Sep 17 00:00:00 2001 From: Pankaj Singh <98807258+pankajastro@users.noreply.github.com> Date: Wed, 7 Aug 2024 15:44:47 +0530 Subject: [PATCH 5/8] Update anyscale_provider/operators/anyscale.py --- anyscale_provider/operators/anyscale.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/anyscale_provider/operators/anyscale.py b/anyscale_provider/operators/anyscale.py index aae915a..98f8923 100644 --- a/anyscale_provider/operators/anyscale.py +++ b/anyscale_provider/operators/anyscale.py @@ -329,10 +329,6 @@ def on_kill(self) -> None: self.log.info("Termination request received. Submitted request to terminate the anyscale service rollout.") return - @staticmethod - def test_me() -> None: - assert 1 == 1 - def execute(self, context: Context) -> None: """ Execute the service rollout to Anyscale. From c9b8bd5b3d8ddd1e0dc65d53423c4ebb9ff45f2c Mon Sep 17 00:00:00 2001 From: Pankaj Singh <98807258+pankajastro@users.noreply.github.com> Date: Wed, 7 Aug 2024 15:45:20 +0530 Subject: [PATCH 6/8] Update .github/workflows/test.yml --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 3d5510d..81b5a8d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -2,7 +2,7 @@ name: test on: push: - branches: [ "main", "test_codecov" ] + branches: [ "main" ] pull_request: branches: [ "main", "test_codecov" ] From 6720d745edef8f422c290cbc952d886c592e6307 Mon Sep 17 00:00:00 2001 From: Pankaj Singh <98807258+pankajastro@users.noreply.github.com> Date: Wed, 7 Aug 2024 15:45:34 +0530 Subject: [PATCH 7/8] Update .github/workflows/test.yml --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 81b5a8d..dca9880 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -4,7 +4,7 @@ on: push: branches: [ "main" ] pull_request: - branches: [ "main", "test_codecov" ] + branches: [ "main" ] concurrency: group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} From 3a5e30d3512e5ec7663518b543136e6692fc13d3 Mon Sep 17 00:00:00 2001 From: Pankaj Singh <98807258+pankajastro@users.noreply.github.com> Date: Wed, 7 Aug 2024 16:48:52 +0530 Subject: [PATCH 8/8] Update .github/workflows/test.yml Co-authored-by: Pankaj Koti --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index dca9880..5c0e5d4 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -139,7 +139,7 @@ jobs: coverage report coverage xml - name: Upload coverage to Codecov - uses: codecov/codecov-action@v3 + uses: codecov/codecov-action@v4 with: fail_ci_if_error: true token: ${{ secrets.CODECOV_TOKEN }}