Automated API test that runs against Thermia API and checks for breaking changes #58
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Automated API test that runs against Thermia API and checks for breaking changes | |
on: | |
schedule: | |
# run every six hours | |
- cron: '0 */6 * * *' | |
workflow_dispatch: | |
jobs: | |
test_api: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4.2.2 | |
- name: Set up Python | |
uses: actions/setup-python@v5.3.0 | |
with: | |
python-version: "3.x" | |
- name: Install Python dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -U -r requirements.txt | |
pip install -U ThermiaOnlineAPI | |
- name: Create .env file | |
run: | | |
touch .env | |
echo "USERNAME=${{ secrets.THERMIA_USERNAME }}" >> .env | |
echo "PASSWORD=${{ secrets.THERMIA_PASSWORD }}" >> .env | |
- name: Run tests against Thermia API | |
run: | | |
python scripts/test_api.py |