diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5e42465a..e5a9a2ae 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,3 +22,16 @@ 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 }} 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 ':)' 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 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