test with .env

This commit is contained in:
Ace 2023-01-11 22:21:46 +01:00 committed by GitHub
parent 24ae6df27e
commit e6618664f2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -25,17 +25,20 @@ jobs:
source venv/bin/activate
python -m pip install --upgrade pip
- name: Install dependencies and run tests
env:
OPENWEATHERMAP_API_KEY: ${{ secrets.OPENWEATHERMAP_API_KEY }}
TODOIST_API_KEY: ${{ secrets.TODOIST_API_KEY }}
- name: Install dependencies
run: |
echo "$PWD"
pip install wheel
pip install -e ./
- name: Setup test environment
run: |
cd inkycal/modules && ls -al
cd ..
cd tests
echo "${{ secrets.ENV_FILE }}" > .env
wget https://raw.githubusercontent.com/aceisace/Inkycal/assets/tests/settings.json
# doesn't work :( sed -i 's/"api_key":.*/"api_key": "${{secrets.OPENWEATHERMAP_API_KEY}}",/' settings.json
- name: Run unittests
run: |
for f in *.py; do python3 "$f"; done