Skip to content

updated folder struct and added ttgo code #2

updated folder struct and added ttgo code

updated folder struct and added ttgo code #2

Workflow file for this run

name: Run Tests
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.12' # Specify Python version
- name: Cache Python packages
uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install dependencies
run: |
pip install -r requirements.txt # Install dependencies
- name: Run tests
run: |
set -e
python -m unittest discover -s tests -p "test_mqtt_subscriber.py"
python -m unittest discover -s tests -p "test_app.py"
env:
DB_HOST: ${{ secrets.DB_HOST }}
DB_NAME: ${{ secrets.DB_NAME }}
DB_PASSWORD: ${{ secrets.DB_PASSWORD }}
DB_PORT: ${{ secrets.DB_PORT }}
DB_USER: ${{ secrets.DB_USER }}
MQTT_BROKER: ${{ secrets.MQTT_BROKER }}
MQTT_PORT: ${{ secrets.MQTT_PORT }}
MQTT_TOPIC: ${{ secrets.MQTT_TOPIC }}
NODE_ENV: ${{ secrets.NODE_ENV }}
TTN_MQTT_BROKER: ${{ secrets.TTN_MQTT_BROKER }}
TTN_MQTT_PASSWORD: ${{ secrets.TTN_MQTT_PASSWORD }}
TTN_MQTT_PORT: ${{ secrets.TTN_MQTT_PORT }}
TTN_MQTT_TOPIC: ${{ secrets.TTN_MQTT_TOPIC }}
TTN_MQTT_USER: ${{ secrets.TTN_MQTT_USER }}