From c2e0adbe2e5bd796b3211c6f5a44c3107a0bc4f6 Mon Sep 17 00:00:00 2001 From: Tom Hu Date: Tue, 24 Sep 2024 15:18:20 -0500 Subject: [PATCH 1/7] 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 2/7] 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 3/7] 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 4/7] 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 5/7] 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 b6b6a806379b04333203d9c650ff7eafe4b7610a Mon Sep 17 00:00:00 2001 From: Nora Shapiro Date: Wed, 25 Sep 2024 10:48:55 -0700 Subject: [PATCH 6/7] add notify_error --- codecov.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/codecov.yml b/codecov.yml index 1ed5513f..a17aedfc 100644 --- a/codecov.yml +++ b/codecov.yml @@ -11,3 +11,7 @@ cli: plugins: pycoverage: report_type: "json" + +codecov: + notify: + notify_error: true From e16919c962598f55862d31b288fa384351f204e9 Mon Sep 17 00:00:00 2001 From: Nora Shapiro Date: Wed, 25 Sep 2024 15:16:22 -0700 Subject: [PATCH 7/7] testing pending --- app/calculator.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/calculator.py b/app/calculator.py index 7706f71a..adad4dcc 100644 --- a/app/calculator.py +++ b/app/calculator.py @@ -14,5 +14,5 @@ def divide(x, y): return 'Cannot divide by 0' return x * 1.0 / y - def smiles(): + def smiles(x, y): return ':)'