Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/sergeileduc/test-python-dotenv


https://github.com/sergeileduc/test-python-dotenv

Last synced: about 2 months ago
JSON representation

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
```