From fb8e448f5c8e7a4108b17db36e55bcdb4439a0dd Mon Sep 17 00:00:00 2001 From: Ace Date: Thu, 8 Sep 2022 22:26:20 +0200 Subject: [PATCH] support for env var --- .github/workflows/tests.yml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 5854e94..383fd65 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -25,14 +25,19 @@ jobs: source venv/bin/activate python -m pip install --upgrade pip - - name: Install dependencies and run + - name: Install dependencies run: | pip install wheel pip install -e ./ cd inkycal/modules && ls -al + + - name: Run tests + env: + OPENWEATHERMAP_API_KEY: secrets.OPENWEATHERMAP_API_KEY + + run: | cd .. cd tests wget https://raw.githubusercontent.com/aceisace/Inkycal/assets/tests/settings.json - sed -i 's/"api_key":.*/"api_key": "${{secrets.OPENWEATHERMAP_API_KEY}}",/' settings.json - sed -i 's/secret_key =.*/secret_key = "${{secrets.OPENWEATHERMAP_API_KEY}}"/' inkycal_weather_test.py + # sed -i 's/"api_key":.*/"api_key": "${{secrets.OPENWEATHERMAP_API_KEY}}",/' settings.json for f in *.py; do python3 "$f"; done