-
-
Notifications
You must be signed in to change notification settings - Fork 13
Use Travis variable for Codacy token in Travis automation script #53
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
Conversation
@SuperKogito
SuperKogito
commented
Apr 17, 2021
- This PR replaces the old public Codacy token with a Travis hidden variable including the new token value.
- The token is defined as an environment variable in Travis, #defining-variables-in-repository-settings.
- To see the results in Codacy, use this link: Codacy/urlchecker-python
SuperKogito
commented
Apr 17, 2021
I am still not done, I am actually testing here, because I am not sure about the correct syntax.
I will let you know once I get it to work so you can take a look at it.
Codecov Report
❗ No coverage uploaded for pull request base (
master@08fc1bb). Click here to learn what that means.
The diff coverage isn/a.
@@ Coverage Diff @@ ## master #53 +/- ## ========================================= Coverage ? 76.76% ========================================= Files ? 12 Lines ? 383 Branches ? 0 ========================================= Hits ? 294 Misses ? 89 Partials ? 0
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing data
Powered by Codecov. Last update 08fc1bb...ec529ef. Read the comment docs.
SuperKogito
commented
Apr 17, 2021
@vsoch so far I tried different approaches and none worked? any idea what am I doing wrong here? do you think it is the syntax or something else?
vsoch
commented
Apr 17, 2021
For GitHub actions?
vsoch
commented
Apr 17, 2021
Oh for travis. You should be able to define it in Travis settings (secrets as they show) and then reference it as an environment variable.
vsoch
commented
Apr 17, 2021
I'd probably encrypt it https://docs.travis-ci.com/user/environment-variables/#defining-encrypted-variables-in-travisyml
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From what I'm reading, I don't think this will work - you need to encrypt it https://docs.travis-ci.com/user/environment-variables/#encrypting-environment-variables
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
okay, if that works, then that works!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
right now it is not, so I am trying to figure the syntax. The alternative you mention would require me to install travis-ci and before that gem and that's extra work I am trying to avoid.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just posted a question on it; maybe someone see what is missing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You could spin up a container if you don't want to install things on your host. I think the encrypted way is the right way to do it (at least what I did when I used travis) but I also think you're right that it should work the "easy" way too. I stopped using travis years ago so I don't know anymore.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will give it a shot tomorrow. Actually I found out that the previous Codacy token was useless since we were not using codacy for this project anymore. I am also moving away from Travis since I hit my limit number of runs there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<personal opinion> I think the project would be fine without it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree, if I cannot fix this, I will drop it. We already have codecov.