Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Distinguish between Appveyor and github-action #6580

Merged
merged 1 commit into from
Nov 3, 2024

Conversation

greg0ire
Copy link
Member

@greg0ire greg0ire commented Nov 2, 2024

Right now, the Codecov UI displays downloads in a confusing way: You get an "appveyor" header, and then 2 list items with links to appveyor, followed by one list item with a link to Github.

We didn't specify that appveyor name anywhere, maybe Codecov behaves differently on that platform. Let us see if specifying a name in the github action that uploads to Codecov allows to clarify things.

Screenshot 2024-11-02 at 17-41-43 Codecov

☝️ screenshot from https://app.codecov.io/github/doctrine/dbal/commit/976f3f374e25806542d789dba2f813db31274d40

The last link leads to https://github.com/doctrine/dbal/actions/runs/11615595861

@greg0ire greg0ire added the CI label Nov 2, 2024
@greg0ire
Copy link
Member Author

greg0ire commented Nov 2, 2024

Result:

Screenshot 2024-11-02 at 18-00-21 Codecov

It does not look like a new section is going to be created, but at least the link is named now, so this should be less confusing.

I couldn't find Appveyor-specific codecov documentation explaining how or why this happens.

SenseException
SenseException previously approved these changes Nov 2, 2024
Copy link
Member

@SenseException SenseException left a comment

Choose a reason for hiding this comment

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

I just peeked into the codecov.sh file that's downloaded by the Appveyor config and it looks like there are some Appveyor specific variables that can be used.

Random example snippet from the bash script:

elif [[ "$CI" = "true" || "$CI" = "True" ]] && [[ "$APPVEYOR" = "true" || "$APPVEYOR" = "True" ]];
then
  say "$e==>$x Appveyor CI detected."
  # http://www.appveyor.com/docs/environment-variables
  service="appveyor"
  branch="$APPVEYOR_REPO_BRANCH"
  build=$(urlencode "$APPVEYOR_JOB_ID")
  pr="$APPVEYOR_PULL_REQUEST_NUMBER"
  job="$APPVEYOR_ACCOUNT_NAME%2F$APPVEYOR_PROJECT_SLUG%2F$APPVEYOR_BUILD_VERSION"
  slug="$APPVEYOR_REPO_NAME"
  commit="$APPVEYOR_REPO_COMMIT"
  build_url=$(urlencode "${APPVEYOR_URL}/project/${APPVEYOR_REPO_NAME}/builds/$APPVEYOR_BUILD_ID/job/${APPVEYOR_JOB_ID}")

Maybe there's also a variable to name it for Appveyor if needed.

@greg0ire
Copy link
Member Author

greg0ire commented Nov 3, 2024

Maybe there's also a variable to name it for Appveyor if needed.

Thanks, I found a cli option 🙂

derrabus
derrabus previously approved these changes Nov 3, 2024
@greg0ire
Copy link
Member Author

greg0ire commented Nov 3, 2024

Screenshot 2024-11-03 at 21-09-37 Codecov
That didn't work great…

@greg0ire
Copy link
Member Author

greg0ire commented Nov 3, 2024

Now trying the slightly more complicated syntax I've seen elsewhere in the file.

@derrabus
Copy link
Member

derrabus commented Nov 3, 2024

Feel free to merge once you're feeling confident about your changes.

@greg0ire
Copy link
Member Author

greg0ire commented Nov 3, 2024

The alternate syntax doesn't work either… I'm quite puzzled 🤔

@greg0ire
Copy link
Member Author

greg0ire commented Nov 3, 2024

Ah that would be because you have to use ps: to enable powershell syntax, it seems.

@greg0ire greg0ire force-pushed the name-upload branch 2 times, most recently from 2144dbb to a0fb6fa Compare November 3, 2024 20:36
Right now, the Codecov UI displays downloads in a confusing way:
You get an "appveyor" header, and then 2 list items with links to
appveyor, followed by one list item with a link to Github.

We didn't specify that appveyor name anywhere, maybe Codecov behaves
differently on that platform. Let us see if specifying names for each
system makes things clearer.
@greg0ire
Copy link
Member Author

greg0ire commented Nov 3, 2024

Running a bash script with Powershell does not seem to work great :/

@greg0ire
Copy link
Member Author

greg0ire commented Nov 3, 2024

Finally! Screenshot 2024-11-03 at 22-07-59 Codecov

@greg0ire greg0ire merged commit 2161a70 into doctrine:3.9.x Nov 3, 2024
95 checks passed
@greg0ire greg0ire deleted the name-upload branch November 3, 2024 21:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants