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

Tests action isn't working for PRs? #14

Closed
syphax-bouazzouni opened this issue Sep 6, 2022 · 4 comments
Closed

Tests action isn't working for PRs? #14

syphax-bouazzouni opened this issue Sep 6, 2022 · 4 comments
Assignees

Comments

@syphax-bouazzouni
Copy link

Hi,
Within this repo, I have done three PRs where the tests worked in our forked environments but not here

Example

My latest PR with the same code

In ontoportal-lirmm

image

In NCBO

image

@syphax-bouazzouni syphax-bouazzouni changed the title Test action isn't working for PR ? Tests action isn't working for PR ? Sep 6, 2022
@syphax-bouazzouni
Copy link
Author

Maybe the issue is with the UT_APIKEY in the ruby.yml workflow

env:
        UT_APIKEY: ${{ secrets.UT_APIKEY }}

@alexskr any thoughts about this?

@alexskr alexskr self-assigned this Sep 6, 2022
@alexskr
Copy link
Member

alexskr commented Sep 6, 2022

its hard to check whether APIKEY stored in the secrets is bad but I reset it anyway. Are you able to re-run tests on your end?

@syphax-bouazzouni syphax-bouazzouni changed the title Tests action isn't working for PR ? Tests action isn't working for PRs? Sep 7, 2022
@alexskr
Copy link
Member

alexskr commented Nov 16, 2022

With the exception of GITHUB_TOKEN, secrets are not passed to the runner when a workflow is triggered from a forked repository so env variable is probably getting set to an empty value. A new extra check should catch this; however, unit test should first validate API key and provide more helpful feedback.

Dependabot pull requests are treated as though they are from a fork which is the reason those are failing as well.

https://stackoverflow.com/questions/58737785/github-actions-empty-env-secrets

alexskr added a commit that referenced this issue Nov 17, 2022
addresses #14 
workflow fails because secrets are not passed to the runner when a workflow is triggered from a forked repository
@syphax-bouazzouni
Copy link
Author

Yeah it works,
image

@alexskr alexskr closed this as completed Nov 23, 2022
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

No branches or pull requests

2 participants