-
-
Notifications
You must be signed in to change notification settings - Fork 13
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
Use Travis variable for Codacy token in Travis automation script #53
base: master
Are you sure you want to change the base?
Conversation
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
I am still not done, I am actually testing here, because I am not sure about the correct syntax. |
Codecov Report
@@ 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.
|
@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? |
For GitHub actions? |
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. |
I'd probably encrypt it https://docs.travis-ci.com/user/environment-variables/#defining-encrypted-variables-in-travisyml |
@@ -8,6 +8,9 @@ python: | |||
- "3.6" | |||
- "3.7" | |||
|
|||
env: | |||
- CODACY_PROJECT_TOKEN=${CodacyToken} |
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.