No Slack Notification after a GitHub Actions workflow

Description

Made a GitHub Actions workflow to run unit tests and create a coverage report using the Codecov GitHub Actions v2 uploader after every push to main branch - works fine, reports are generated and uploaded correctly. However, I also have a codecov.yml in my repo configured to send Slack notifications - no notifications are sent. Wondering if my workflow yml and my repo codecov.yml aren’t compatible or something?

CI/CD URL

Private repo so can’t really link the workflow run, but it works fine. Will post the Codecov output anyways in case it could be helpful

Codecov Output

==> linux OS detected
https://uploader.codecov.io/latest/linux/codecov.SHA256SUM
==> SHASUM file signed by key id 806bb28aed779869
==> Uploader SHASUM verified (330066ecce62f2cdcfd2fe1845095475f51bbad9649dce81ac7b663dc884bbef  codecov)
==> Running version latest
==> Running version v0.1.9
/__w/_actions/codecov/codecov-action/v2/dist/codecov -n  -Q github-action-2.1.0 -Z -f repo/lcov2.info -v
[2022-01-26T02:23:19.318Z] ['info'] 
     _____          _
    / ____|        | |
   | |     ___   __| | ___  ___ _____   __
   | |    / _ \ / _` |/ _ \/ __/ _ \ \ / /
   | |___| (_) | (_| |  __/ (_| (_) \ V /
    \_____\___/ \__,_|\___|\___\___/ \_/

  Codecov report uploader 0.1.15
[2022-01-26T02:23:19.321Z] ['info'] => Project root located at: /__w/sdk-common/sdk-common
[2022-01-26T02:23:19.321Z] ['info'] ->  Token found by environment variables
[2022-01-26T02:23:19.325Z] ['info'] Searching for coverage files...
[2022-01-26T02:23:19.400Z] ['info'] Warning: Some files passed via the -f flag would normally be excluded from search.
[2022-01-26T02:23:19.400Z] ['info'] If Codecov encounters issues processing your reports, please review https://docs.codecov.com/docs/supported-report-formats
[2022-01-26T02:23:19.400Z] ['info'] => Found 1 possible coverage files:
  repo/lcov2.info
[2022-01-26T02:23:19.400Z] ['info'] Processing /__w/sdk-common/sdk-common/repo/lcov2.info...
[2022-01-26T02:23:19.440Z] ['info'] Detected GitHub Actions as the CI provider.
[2022-01-26T02:23:19.441Z] ['info'] Pinging Codecov: https://codecov.io/upload/v4?package=github-action-2.1.0-uploader-0.1.15&token=*******&branch=main&build=1748719477&build_url=https%3A%2F%2Fgithub.com%2Fzozonz%2Fsdk-common%2Factions%2Fruns%2F1748719477&commit=401851962d00ca4d144c71b0cbb92c295900475c&job=Common+Unit+Test+Coverage&pr=&service=github-actions&slug=zozonz%2Fsdk-common&name=&tag=&flags=&parent=
[2022-01-26T02:23:20.034Z] ['info'] Uploading...
[2022-01-26T02:23:20.732Z] ['info'] {"status":"success","resultURL":"https://codecov.io/github/zozonz/sdk-common/commit/401851962d00ca4d144c71b0cbb92c295900475c"}

Expected Results

I was hoping that when the workflow finished and the coverage report was sent to Codecov, I’d get a Slack notification detailing the coverage of the main branch after the merge (workflow only runs after merges to main branch).

Actual Results

No Slack notification even though I’ve configured notifications in codecov.yml. How to trigger the yml so the notification is sent?

Additional Information

Here’s my codecov.yml

codecov:
  require_ci_to_pass: yes

coverage:
  precision: 2
  round: down
  range: "70...100"
  notify:
    slack:
      default:
        url: "https://hooks.slack.com/services/[REDACTED]"

parsers:
  gcov:
    branch_detection:
      conditional: yes
      loop: yes
      method: no
      macro: no

comment:
  layout: "reach,diff,flags,files,footer"
  behavior: default
  require_changes: no

The yml shoud be identical to the default yml with the exception of the Slack notification

@francisbilham11 have you added the GitHub app integration for this repository?

ah, I had not. Doing so fixed the issue, thank you

1 Like