Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@uuf6429
Copy link
Contributor

@uuf6429 uuf6429 commented Apr 19, 2025

Fixes #283.

Someone with access should follow the comment below, to set up codecov for the Behat org.

@codecov-commenter
Copy link

codecov-commenter commented Apr 19, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.48%. Comparing base (c87d49a) to head (75700ca).
Report is 10 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##             master     #299   +/-   ##
=========================================
  Coverage     95.48%   95.48%           
  Complexity      598      598           
=========================================
  Files            35       35           
  Lines          1796     1796           
=========================================
  Hits           1715     1715           
  Misses           81       81           
Flag Coverage Δ
php8.1 95.48% <ø> (ø)
php8.1--with=symfony/yaml:^5.4 95.48% <ø> (ø)
php8.1--with=symfony/yaml:^6.4 95.48% <ø> (ø)
php8.2 95.48% <ø> (ø)
php8.3 95.48% <ø> (ø)
php8.4 95.48% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

- run: composer test -- --coverage-clover=coverage.xml --log-junit junit.xml --testdox
- uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@uuf6429 I have authorised the codecov app (for Behat/Gherkin only at this point, we can add it to other repositories as and when required).

I'm still not clear why the workflow specifies a secrets.CODECOV_TOKEN that is not defined (and therefore empty) and whether that will continue to work once this PR is merged. I'm somewhat surprised if Codecov allow anyone to upload coverage reports unauthenticated, but maybe that's the case. Can you provide any more info on how this works? If we don't in fact require a secret then we should remove these token arguments from the yaml to avoid confusion.

Copy link
Contributor Author

@uuf6429 uuf6429 Apr 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As I understand, there were 3 options:

  1. per-repository secret
  2. per-organisation secret
  3. github app/plugin

..so I'm guessing that the secret is no longer needed with the 3rd option.
I'll remove it and we can see what happens. 🤷

Copy link
Contributor Author

@uuf6429 uuf6429 Apr 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems to still be working fine.

I'm somewhat surprised if Codecov allow anyone to upload coverage reports unauthenticated, but maybe that's the case.

My guess is that:

  • codecov already knows about this project (it even lists other behat org projects)
  • codecov understands that this is a PR run (it even shows that in the branch dropdown, prefixing my branches with my username)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess easiest way to see this is to get it merged (after the other point(s) are also considered).

@carlos-granados can you also give this PR a look please?

@uuf6429 uuf6429 requested a review from acoulton April 21, 2025 15:13
Copy link
Contributor

@carlos-granados carlos-granados left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other than my comment about blank lines everything else looks good

@uuf6429 uuf6429 requested a review from carlos-granados April 22, 2025 12:24
Copy link
Contributor

@acoulton acoulton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @uuf6429

Copy link
Contributor

@carlos-granados carlos-granados left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @uuf6429

@acoulton acoulton merged commit dead48b into Behat:master Apr 24, 2025
10 checks passed
@acoulton
Copy link
Contributor

@uuf6429 well, the codecov steps in master are passing (in that they're exiting 0) but I don't think they're actually working, the logs for both say:

error - 2025-04-24 20:15:32,297 -- Upload failed: {"message":"Token required because branch is protected"}

There's also an error Could not pull latest version information: SyntaxError: Unexpected token '<', "<!DOCTYPE "... is not valid JSON which looks like their action is trying to hit an API but getting an HTML page? Not sure if that's related.

Are you able to look into what needs to be done to get this working?

@uuf6429
Copy link
Contributor Author

uuf6429 commented Apr 24, 2025

@acoulton how about we add back the token? In the past that's what I've been using.

@uuf6429 uuf6429 deleted the chore/update-pipeline branch April 24, 2025 20:40
@uuf6429 uuf6429 mentioned this pull request Apr 24, 2025
@uuf6429
Copy link
Contributor Author

uuf6429 commented Apr 24, 2025

Although interestingly, there are actually results for the master branch:
https://app.codecov.io/gh/Behat/Gherkin

Strange.

@acoulton
Copy link
Contributor

acoulton commented Apr 24, 2025

Moved to #301 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update GH workflow

4 participants