From c2e0adbe2e5bd796b3211c6f5a44c3107a0bc4f6 Mon Sep 17 00:00:00 2001 From: Tom Hu Date: Tue, 24 Sep 2024 15:18:20 -0500 Subject: [PATCH 01/15] chore(test): make a fake coverage report --- .github/workflows/ci.yml | 9 +++++++++ fake-file.txt | 1 + 2 files changed, 10 insertions(+) create mode 100644 fake-file.txt diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5e42465a..7f3aabc2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,3 +22,12 @@ jobs: verbose: true env: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} + + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v4 + with: + file: fake-file.txt + flag: fake + verbose: true + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} diff --git a/fake-file.txt b/fake-file.txt new file mode 100644 index 00000000..5ef6fd01 --- /dev/null +++ b/fake-file.txt @@ -0,0 +1 @@ +thisisnotacoveragereport From b28b0d22edf20873dc4e032a1d9c1d729820578b Mon Sep 17 00:00:00 2001 From: Tom Hu Date: Tue, 24 Sep 2024 15:19:00 -0500 Subject: [PATCH 02/15] fix: make it flags --- .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 7f3aabc2..198a8a78 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -27,7 +27,7 @@ jobs: uses: codecov/codecov-action@v4 with: file: fake-file.txt - flag: fake + flags: fake verbose: true env: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} From 4af7388ffae7d01a1ef3f7aa877c7d70e5f44414 Mon Sep 17 00:00:00 2001 From: Tom Hu Date: Tue, 24 Sep 2024 15:20:31 -0500 Subject: [PATCH 03/15] fix: remove the existing coverage report --- .github/workflows/ci.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 198a8a78..447d9f32 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,6 +23,9 @@ jobs: env: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} + - name: Delete existing coverage report + run: rm coverage.json + - name: Upload coverage to Codecov uses: codecov/codecov-action@v4 with: From d3bfda4c147cd682735fde8b2670ab3f12887fb5 Mon Sep 17 00:00:00 2001 From: Tom Hu Date: Tue, 24 Sep 2024 15:21:39 -0500 Subject: [PATCH 04/15] fix: dont run coverage.py --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 447d9f32..e5a9a2ae 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -31,6 +31,7 @@ jobs: with: file: fake-file.txt flags: fake + plugins: noop verbose: true env: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} From ff644e10efa69352807af429b2c645b588bbbda1 Mon Sep 17 00:00:00 2001 From: Tom Hu Date: Tue, 24 Sep 2024 15:30:13 -0500 Subject: [PATCH 05/15] fix: make a change --- app/calculator.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/calculator.py b/app/calculator.py index 4f380e8e..7706f71a 100644 --- a/app/calculator.py +++ b/app/calculator.py @@ -14,3 +14,5 @@ def divide(x, y): return 'Cannot divide by 0' return x * 1.0 / y + def smiles(): + return ':)' From dae21f791c8768903c4b9162e47344dac634f179 Mon Sep 17 00:00:00 2001 From: Tom Hu Date: Fri, 27 Sep 2024 12:22:53 -0500 Subject: [PATCH 06/15] fix: try orb with no plugins --- .circleci/config.yml | 3 ++- .github/workflows/ci.yml | 13 ------------- 2 files changed, 2 insertions(+), 14 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index fe5ae248..628e6ebb 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -14,7 +14,8 @@ jobs: - run: name: Run tests and collect coverage command: pytest --cov app - - codecov/upload + - codecov/upload: + upload_args: --plugin noop workflow: version: 2.1 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e5a9a2ae..5e42465a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,16 +22,3 @@ jobs: verbose: true env: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} - - - name: Delete existing coverage report - run: rm coverage.json - - - name: Upload coverage to Codecov - uses: codecov/codecov-action@v4 - with: - file: fake-file.txt - flags: fake - plugins: noop - verbose: true - env: - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} From 5fe4ef7000bd5ec46e1d725d08bf173bfe797490 Mon Sep 17 00:00:00 2001 From: Tom Hu Date: Fri, 27 Sep 2024 12:27:13 -0500 Subject: [PATCH 07/15] fix: set token --- .circleci/config.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 628e6ebb..7c0164a7 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -15,6 +15,7 @@ jobs: name: Run tests and collect coverage command: pytest --cov app - codecov/upload: + token: ${CODECOV_TOKEN} upload_args: --plugin noop workflow: From 8b889c905c7310a3950131d9b49a5e3b66294eba Mon Sep 17 00:00:00 2001 From: Tom Hu Date: Fri, 27 Sep 2024 12:28:00 -0500 Subject: [PATCH 08/15] fix: env var --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 7c0164a7..9eeb530b 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -15,7 +15,7 @@ jobs: name: Run tests and collect coverage command: pytest --cov app - codecov/upload: - token: ${CODECOV_TOKEN} + token: CODECOV_TOKEN upload_args: --plugin noop workflow: From 8e3fb0464c30210b52acc55b965d345f2f6ffbb7 Mon Sep 17 00:00:00 2001 From: Tom Hu Date: Fri, 27 Sep 2024 12:29:28 -0500 Subject: [PATCH 09/15] fix: run coverage xml --- .circleci/config.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 9eeb530b..3117ad74 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -13,7 +13,9 @@ jobs: command: pip install -r requirements.txt - run: name: Run tests and collect coverage - command: pytest --cov app + command: | + pytest --cov app + coverage xml - codecov/upload: token: CODECOV_TOKEN upload_args: --plugin noop From 9bd5a08c25638401d044dd3a66377ba4a6efdd94 Mon Sep 17 00:00:00 2001 From: Tom Hu Date: Fri, 27 Sep 2024 12:31:41 -0500 Subject: [PATCH 10/15] fix: verbose --- .circleci/config.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 3117ad74..b3194ed2 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -17,6 +17,7 @@ jobs: pytest --cov app coverage xml - codecov/upload: + cli_args: -v token: CODECOV_TOKEN upload_args: --plugin noop From 4a1a8244073bcd4a2a31c22988aa29895f6bbfc8 Mon Sep 17 00:00:00 2001 From: Tom Hu Date: Fri, 27 Sep 2024 12:47:23 -0500 Subject: [PATCH 11/15] fix: update calculator --- app/calculator.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/app/calculator.py b/app/calculator.py index 7706f71a..8a976b25 100644 --- a/app/calculator.py +++ b/app/calculator.py @@ -13,6 +13,3 @@ def divide(x, y): if y == 0: return 'Cannot divide by 0' return x * 1.0 / y - - def smiles(): - return ':)' From 7f141f53ee16fb0e8373dff9f6294bdfcba8639c Mon Sep 17 00:00:00 2001 From: Tom Hu Date: Tue, 22 Oct 2024 11:32:11 -0500 Subject: [PATCH 12/15] fix: try the new config --- .circleci/config.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index b3194ed2..f0f45785 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,6 +1,7 @@ +--- version: 2.1 orbs: - codecov: codecov/codecov@4 + codecov: codecov/codecov@5 jobs: build: @@ -17,9 +18,11 @@ jobs: pytest --cov app coverage xml - codecov/upload: - cli_args: -v + files: coverage.xml + plugins: noop token: CODECOV_TOKEN - upload_args: --plugin noop + verbose: true + when: always workflow: version: 2.1 From d354a214282be8d4b7d96ad9ac1b026b9066b785 Mon Sep 17 00:00:00 2001 From: Tom Hu Date: Tue, 22 Oct 2024 11:33:57 -0500 Subject: [PATCH 13/15] fix: maybe its the star --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index f0f45785..5428b8ec 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -18,7 +18,7 @@ jobs: pytest --cov app coverage xml - codecov/upload: - files: coverage.xml + files: coverage.* plugins: noop token: CODECOV_TOKEN verbose: true From 5cfbf75ab7d9cb8ab5c5365264d5f66d8df3b3a7 Mon Sep 17 00:00:00 2001 From: Tom Hu Date: Tue, 22 Oct 2024 11:35:33 -0500 Subject: [PATCH 14/15] fix: maybe with ml --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 5428b8ec..13a41970 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -18,7 +18,7 @@ jobs: pytest --cov app coverage xml - codecov/upload: - files: coverage.* + files: coverage.*ml plugins: noop token: CODECOV_TOKEN verbose: true From 311f5f059b54cde85cf6511590cdf4b16bf015e4 Mon Sep 17 00:00:00 2001 From: Tom Hu Date: Tue, 22 Oct 2024 11:37:38 -0500 Subject: [PATCH 15/15] fix: didnt run --- .circleci/config.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 13a41970..666429d4 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -23,7 +23,6 @@ jobs: token: CODECOV_TOKEN verbose: true when: always - workflow: version: 2.1 build-test: