From 262362fdf08396ebee03efbbee11465fea8b8e08 Mon Sep 17 00:00:00 2001 From: Andre Kurait Date: Tue, 12 Nov 2024 21:27:49 -0600 Subject: [PATCH 1/3] Update CI workflow to trigger with pull_request_target Signed-off-by: Andre Kurait --- .github/workflows/CI.yml | 58 ++++++++++++++++++---------------------- 1 file changed, 26 insertions(+), 32 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index c1f8e7b35..d963a76f6 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -2,7 +2,7 @@ name: CI on: push: - pull_request: + pull_request_target: env: python-version: '3.11' @@ -63,20 +63,20 @@ jobs: pipenv install --deploy --dev pipenv run test pipenv run coverage xml - - name: Upload Coverage with retry - uses: Wandalen/wretry.action@v3.7.2 + - name: Upload Coverage + uses: codecov/codecov-action@v4 with: - attempt_limit: 5 - attempt_delay: 2000 - action: codecov/codecov-action@v4 - with: | - token: ${{ secrets.CODECOV_TOKEN }} - files: ./coverage.xml - flags: python-test - fail_ci_if_error: true + verbose: true + token: ${{ secrets.CODECOV_TOKEN }} + files: ./coverage.xml + flags: python-test + fail_ci_if_error: true console-api-tests: runs-on: ubuntu-latest + strategy: + matrix: + iteration: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20] defaults: run: working-directory: ./TrafficCapture/dockerSolution/src/main/docker/migrationConsole/console_api @@ -90,17 +90,14 @@ jobs: pipenv install --deploy --dev pipenv run coverage run --source='.' manage.py test console_api pipenv run coverage xml - - name: Upload Coverage with retry - uses: Wandalen/wretry.action@v3.7.2 + - name: Upload Coverage + uses: codecov/codecov-action@v4 with: - attempt_limit: 5 - attempt_delay: 2000 - action: codecov/codecov-action@v4 - with: | - token: ${{ secrets.CODECOV_TOKEN }} - files: ./coverage.xml - flags: python-test - fail_ci_if_error: true + verbose: true + token: ${{ secrets.CODECOV_TOKEN }} + files: ./coverage.xml + flags: python-test + fail_ci_if_error: true gradle-tests: @@ -132,18 +129,15 @@ jobs: path: | **/build/reports/tests/ **/reports/jacoco/mergedReport/ - - name: Upload Coverage with retry - uses: Wandalen/wretry.action@v3.7.2 + - name: Upload Coverage + uses: codecov/codecov-action@v4 with: - attempt_limit: 5 - attempt_delay: 2000 - action: codecov/codecov-action@v4 - with: | - token: ${{ secrets.CODECOV_TOKEN }} - files: ${{ github.workspace }}/build/reports/jacoco/mergedReport/jacocoMergedReport.xml - flags: gradle-test - fail_ci_if_error: true - disable_search: true + verbose: true + token: ${{ secrets.CODECOV_TOKEN }} + fail_ci_if_error: true + files: ${{ github.workspace }}/build/reports/jacoco/mergedReport/jacocoMergedReport.xml + flags: gradle-test + disable_search: true From 04b4482f2333a05a03c1c725c52272ad531e559c Mon Sep 17 00:00:00 2001 From: Andre Kurait Date: Tue, 12 Nov 2024 21:31:12 -0600 Subject: [PATCH 2/3] Remove duplicate codecov testing Signed-off-by: Andre Kurait --- .github/workflows/CI.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index d963a76f6..ac9d774bf 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -74,9 +74,6 @@ jobs: console-api-tests: runs-on: ubuntu-latest - strategy: - matrix: - iteration: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20] defaults: run: working-directory: ./TrafficCapture/dockerSolution/src/main/docker/migrationConsole/console_api From 75fafba897e9d9022b572b77e3650105137188f6 Mon Sep 17 00:00:00 2001 From: Andre Kurait Date: Wed, 13 Nov 2024 09:06:42 -0600 Subject: [PATCH 3/3] Sort codecov parameters in github actions Signed-off-by: Andre Kurait --- .github/workflows/CI.yml | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index ac9d774bf..b21b46526 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -66,11 +66,11 @@ jobs: - name: Upload Coverage uses: codecov/codecov-action@v4 with: - verbose: true - token: ${{ secrets.CODECOV_TOKEN }} + fail_ci_if_error: true files: ./coverage.xml flags: python-test - fail_ci_if_error: true + token: ${{ secrets.CODECOV_TOKEN }} + verbose: true console-api-tests: runs-on: ubuntu-latest @@ -90,11 +90,11 @@ jobs: - name: Upload Coverage uses: codecov/codecov-action@v4 with: - verbose: true - token: ${{ secrets.CODECOV_TOKEN }} + fail_ci_if_error: true files: ./coverage.xml flags: python-test - fail_ci_if_error: true + token: ${{ secrets.CODECOV_TOKEN }} + verbose: true gradle-tests: @@ -129,13 +129,12 @@ jobs: - name: Upload Coverage uses: codecov/codecov-action@v4 with: - verbose: true - token: ${{ secrets.CODECOV_TOKEN }} + disable_search: true fail_ci_if_error: true files: ${{ github.workspace }}/build/reports/jacoco/mergedReport/jacocoMergedReport.xml flags: gradle-test - disable_search: true - + token: ${{ secrets.CODECOV_TOKEN }} + verbose: true python-e2e-tests: