Skip to content

Added codecov token in cleartext #40

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

Merged
merged 2 commits into from
Jan 17, 2024
Merged

Added codecov token in cleartext #40

merged 2 commits into from
Jan 17, 2024

Conversation

cmaglie
Copy link
Member

@cmaglie cmaglie commented Dec 5, 2023

See: #36 (review)

The Codecov upload token will be no longer optional in v4 of the action, so it will be necessary to adjust the workflow to provide the token to the action at the same time as the bump. Doing so is a good idea anyway because, although supported in v3, the lack of a token was causing periodic spurious coverage data upload failures. That was done already in the Arduino CLI repo (arduino/arduino-cli#2129) and the approach used there has passed the test of time with flying colors.

The workflow does currently use the token input of the action, but it uses the flawed approach of storing it in a secret, which would cause the workflow run to fail on any PR submitted from a fork after the action bump. So the workflow must be updated to use the system implemented in the Arduino CLI workflow.

The Codecov upload token will be no longer optional in v4 of the action,
so it will be necessary to adjust the workflow to provide the
token to the action at the same time as the bump. Doing so is a good
idea anyway because, although supported in v3, the lack of a token
was causing periodic spurious coverage data upload failures. That
was done already in the Arduino CLI repo (arduino/arduino-cli#2129)
and the approach used there has passed the test of time with flying
colors.

The workflow does currently use the token input of the action, but
it uses the flawed approach of storing it in a secret, which would
cause the workflow run to fail on any PR submitted from a fork after
the action bump. So the workflow must be updated to use the system
implemented in the Arduino CLI workflow.
@cmaglie cmaglie self-assigned this Dec 5, 2023
@cmaglie
Copy link
Member Author

cmaglie commented Dec 5, 2023

@per1234 @arduino/team_tooling
do you know a way to perform the var comparison in both Windows and UNIX runners?

Run if [[ "arduino/pluggable-discovery-protocol-handler" == "arduino/pluggable-discovery-protocol-handler" ]]; then
ParserError: D:\a\_temp\43fdaab8-e175-4fc8-9ad9-7a3b4bb08100.ps1:2
Line |
   2 |  if [[ "arduino/pluggable-discovery-protocol-handler" == "arduino/plug …
     |    ~
     | Missing '(' after 'if' in if statement.

Error: Process completed with exit code 1.

https://github.com/arduino/pluggable-discovery-protocol-handler/actions/runs/7098847869/job/19321628795?pr=40

@umbynos
Copy link

umbynos commented Dec 5, 2023

What about using conditional statement inside github actions?

@per1234 per1234 added topic: infrastructure Related to project infrastructure type: imperfection Perceived defect in any part of project labels Dec 7, 2023
@cmaglie cmaglie requested review from per1234 and umbynos January 15, 2024 13:55
@cmaglie cmaglie merged commit 0b6ac3b into main Jan 17, 2024
@cmaglie cmaglie deleted the codecov-token branch January 17, 2024 16:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: infrastructure Related to project infrastructure type: imperfection Perceived defect in any part of project
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants