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

Use Travis variable for Codacy token in Travis automation script #53

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

SuperKogito
Copy link
Member

@SuperKogito SuperKogito requested a review from vsoch April 17, 2021 20:42
@SuperKogito
Copy link
Member Author

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
Copy link

codecov bot commented Apr 17, 2021

Codecov Report

❗ No coverage uploaded for pull request base (master@08fc1bb). Click here to learn what that means.
The diff coverage is n/a.

Impacted file tree graph

@@            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
Copy link
Member Author

@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
Copy link
Collaborator

vsoch commented Apr 17, 2021

For GitHub actions?

@vsoch
Copy link
Collaborator

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
Copy link
Collaborator

vsoch commented Apr 17, 2021

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}
Copy link
Collaborator

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

Copy link
Member Author

@SuperKogito SuperKogito Apr 17, 2021

Choose a reason for hiding this comment

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

I am actually following this
I don't see the need to encrypt. In this case the variable is defined under Settings and is hidden.

Copy link
Collaborator

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!

Copy link
Member Author

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.

Copy link
Member Author

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.

Copy link
Collaborator

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.

Copy link
Member Author

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.

Copy link
Collaborator

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.

Copy link
Member Author

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.

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.

2 participants