From 95d10f898acb77e5bcabf601ab6db602f7a5c6b6 Mon Sep 17 00:00:00 2001 From: Rohit Vinnakota <148245014+rohitvinnakota-codecov@users.noreply.github.com> Date: Wed, 19 Feb 2025 13:42:22 -0500 Subject: [PATCH 1/7] Update ci.yml --- .github/workflows/ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 15abf468..d58ac8c7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,12 +15,13 @@ jobs: - name: Install dependencies run: pip install -r requirements.txt - name: Run tests and collect coverage - run: pytest --cov app + run: pytest --cov-branch --cov-report=xml - name: Upload coverage to Codecov (arg token) uses: codecov/codecov-action@main with: fail_ci_if_error: true token: ${{ secrets.CODECOV_TOKEN }} + slug: test-org-20241/example-python verbose: true - name: Upload coverage to Codecov (env token) uses: codecov/codecov-action@main From 1fc9e2ac42e8ef751307788fbf7b9aebe71d034c Mon Sep 17 00:00:00 2001 From: Rohit Vinnakota <148245014+rohitvinnakota-codecov@users.noreply.github.com> Date: Wed, 19 Feb 2025 13:51:12 -0500 Subject: [PATCH 2/7] Update ci.yml --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d58ac8c7..0380b2f0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,7 +15,7 @@ jobs: - name: Install dependencies run: pip install -r requirements.txt - name: Run tests and collect coverage - run: pytest --cov-branch --cov-report=xml + run: pytest --cov app - name: Upload coverage to Codecov (arg token) uses: codecov/codecov-action@main with: From b6a17657943515481b7362d613cca8a6f8573294 Mon Sep 17 00:00:00 2001 From: Rohit Vinnakota <148245014+rohitvinnakota-codecov@users.noreply.github.com> Date: Wed, 19 Feb 2025 13:57:11 -0500 Subject: [PATCH 3/7] Update ci.yml --- .github/workflows/ci.yml | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0380b2f0..fa3789ad 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,21 +23,3 @@ jobs: token: ${{ secrets.CODECOV_TOKEN }} slug: test-org-20241/example-python verbose: true - - name: Upload coverage to Codecov (env token) - uses: codecov/codecov-action@main - with: - fail_ci_if_error: true - verbose: true - env: - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} - - name: Upload coverage to Codecov (no token) - uses: codecov/codecov-action@main - with: - fail_ci_if_error: true - verbose: true - - name: Upload coverage to Codecov (oidc) - uses: codecov/codecov-action@main - with: - fail_ci_if_error: true - use_oidc: true - verbose: true From 9e3e4c1d076f2f823706a3da6b3b144732b7e7a2 Mon Sep 17 00:00:00 2001 From: Rohit Vinnakota <148245014+rohitvinnakota-codecov@users.noreply.github.com> Date: Wed, 19 Feb 2025 15:51:50 -0500 Subject: [PATCH 4/7] Update enforce-license-compliance.yml --- .github/workflows/enforce-license-compliance.yml | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/.github/workflows/enforce-license-compliance.yml b/.github/workflows/enforce-license-compliance.yml index 86be7410..8b137891 100644 --- a/.github/workflows/enforce-license-compliance.yml +++ b/.github/workflows/enforce-license-compliance.yml @@ -1,14 +1 @@ -name: Enforce License Compliance -on: - pull_request: - branches: [main, master] - -jobs: - enforce-license-compliance: - runs-on: ubuntu-latest - steps: - - name: 'Enforce License Compliance' - uses: getsentry/action-enforce-license-compliance@57ba820387a1a9315a46115ee276b2968da51f3d # main - with: - fossa_api_key: ${{ secrets.FOSSA_API_KEY }} From 157d844cd24628043cc2b4ba0b33c788380df4ca Mon Sep 17 00:00:00 2001 From: Rohit Vinnakota <148245014+rohitvinnakota-codecov@users.noreply.github.com> Date: Thu, 20 Feb 2025 12:00:09 -0500 Subject: [PATCH 5/7] Create pylint.yml --- .github/workflows/pylint.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 .github/workflows/pylint.yml diff --git a/.github/workflows/pylint.yml b/.github/workflows/pylint.yml new file mode 100644 index 00000000..c73e032c --- /dev/null +++ b/.github/workflows/pylint.yml @@ -0,0 +1,23 @@ +name: Pylint + +on: [push] + +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: ["3.8", "3.9", "3.10"] + steps: + - uses: actions/checkout@v4 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v3 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install pylint + - name: Analysing the code with pylint + run: | + pylint $(git ls-files '*.py') From 550b80d303ab3c8498cc270da65a430c022d463e Mon Sep 17 00:00:00 2001 From: Rohit Vinnakota <148245014+rohitvinnakota-codecov@users.noreply.github.com> Date: Thu, 20 Feb 2025 12:12:20 -0500 Subject: [PATCH 6/7] Update calculator.py --- app/calculator.py | 1 + 1 file changed, 1 insertion(+) diff --git a/app/calculator.py b/app/calculator.py index 4f380e8e..be32d0cf 100644 --- a/app/calculator.py +++ b/app/calculator.py @@ -1,6 +1,7 @@ class Calculator: def add(x, y): + print("HI") return x + y def subtract(x, y): From d9baa49c83c42d4f8314b14978b5234219eeb37c Mon Sep 17 00:00:00 2001 From: Rohit Vinnakota <148245014+rohitvinnakota-codecov@users.noreply.github.com> Date: Wed, 5 Mar 2025 15:20:25 -0500 Subject: [PATCH 7/7] Update ci.yml --- .github/workflows/ci.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fa3789ad..9f819f4c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,7 +15,7 @@ jobs: - name: Install dependencies run: pip install -r requirements.txt - name: Run tests and collect coverage - run: pytest --cov app + run: pytest --cov --junitxml=junit.xml - name: Upload coverage to Codecov (arg token) uses: codecov/codecov-action@main with: @@ -23,3 +23,10 @@ jobs: token: ${{ secrets.CODECOV_TOKEN }} slug: test-org-20241/example-python verbose: true + - name: Upload test results to Codecov + if: ${{ !cancelled() }} + uses: codecov/test-results-action@v1 + with: + token: ${{ secrets.CODECOV_TOKEN }} + +