My CI is not seeing my environment variables! #24
-
|
My tests are failing because the code doesn't see my environment variables, though I do have them in my "repository secrets". Concrete example: This part fails: where (currently) the `` contents can be found here |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 7 replies
-
tldr;Add this to the part of the CI that fails: detailsTo ensure that your GitHub Actions workflow can access the Here's how you can modify your - name: Pytest Validation
uses: i2mint/isee/actions/pytest-validation@master
with:
root-dir: ${{ env.PROJECT_NAME }}
paths-to-ignore: examples,scrap
env:
KAGGLE_KEY: ${{ secrets.KAGGLE_KEY }}In this snippet, the Remember, for this to work:
By making this change, your GitHub Actions workflow should be able to access the |
Beta Was this translation helpful? Give feedback.
tldr;
Add this to the part of the CI that fails:
details
To ensure that your GitHub Actions workflow can access the
KAGGLE_KEYenvironment variable that you've stored in your repository secrets, you need to explicitly pass this secret to the workflow. Secrets are not passed to the runner environment by default for security reasons.Here's how you can modify your
ci.ymlfile to include theKAGGLE_KEYenvironment variable: