Skip to content

Commit 25e52c0

Browse files
author
brentru
committed
export env vars
1 parent 6706193 commit 25e52c0

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

.github/workflows/build.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ jobs:
1818
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
1919
- name: Install library
2020
run: python3 setup.py install
21+
- name: Secret
22+
env:
23+
secret_io_key: ${{ secrets.CI_IO_KEY }
24+
secret_io_user: ${{ secrets.CI_IO_USERNAME }
2125
- name: Run all unittests
2226
run: |
2327
cd tests/

tests/base.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def get_test_key(self):
2828
"""Return the AIO key specified in the ADAFRUIT_IO_KEY environment
2929
variable, or raise an exception if it doesn't exist.
3030
"""
31-
key = os.environ[CI_IO_KEY]
31+
key = secrets.[CI_IO_KEY]
3232
if key is None:
3333
raise RuntimeError("ADAFRUIT_IO_KEY environment variable must be " \
3434
"set with valid Adafruit IO key to run this test!")
@@ -38,7 +38,7 @@ def get_test_username(self):
3838
"""Return the AIO username specified in the ADAFRUIT_IO_USERNAME
3939
environment variable, or raise an exception if it doesn't exist.
4040
"""
41-
username = os.environ[CI_IO_USERNAME]
41+
username = secrets.[CI_IO_USERNAME]
4242
if username is None:
4343
raise RuntimeError("ADAFRUIT_IO_USERNAME environment variable must be " \
4444
"set with valid Adafruit IO username to run this test!")

0 commit comments

Comments
 (0)