Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sergeileduc/test-python-dotenv
https://github.com/sergeileduc/test-python-dotenv
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/sergeileduc/test-python-dotenv
- Owner: Sergeileduc
- Created: 2019-11-29T14:50:02.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2020-08-01T10:50:13.000Z (over 4 years ago)
- Last Synced: 2024-10-12T01:46:52.068Z (3 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
![Python application](https://github.com/Sergeileduc/python_dotenv_test/workflows/Python%20application/badge.svg)
# 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
```