https://github.com/sergeileduc/test-python-dotenv
https://github.com/sergeileduc/test-python-dotenv
Last synced: 4 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/sergeileduc/test-python-dotenv
- Owner: Sergeileduc
- Created: 2019-11-29T14:50:02.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-08-01T10:50:13.000Z (almost 5 years ago)
- Last Synced: 2025-01-17T16:26:55.849Z (6 months ago)
- Language: Python
- Size: 9.77 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README

# test-python-dotenv
## Local test :
Create `.env` file and define varenv :
`ABC_KEY="1234xyz"`Run the test with `pytest`
For youtube tests to pass :
Create `TOKEN` varenv as well with your Youtube API token.## Use Github actions and secret varenv
Add `ABC_KEY` and `TOKEN` in Github/Settings/Secret
Configure a Github Action workflow with pytest :
```
- name: Test with pytest
env: # Or as an environment variable
ABC_KEY: ${{ secrets.ABC_KEY }}
TOKEN: ${{ secrets.TOKEN }}
run: |
pip install pytest
pytest
```