Skip to content

Daily tests

Daily tests #91

Workflow file for this run

name: Daily tests
on:
schedule:
- cron: '0 10,18 * * *'
workflow_dispatch:
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install poetry
poetry config virtualenvs.create false
poetry install --with dev,test
- name: Launch live tests
run: |
make live_test
env:
SECRET_RAW_ACCESS_CODE: ${{ secrets.RENTRY_SECRET_RAW_ACCESS_CODE }}
- name: Telegram notification on failure
if: ${{ failure() }}
run: |
curl --silent --output /dev/null -X POST https://api.telegram.org/bot${{ secrets.NOTIFICATION_TELEGRAM_BOT_TOKEN }}/sendMessage \
-H "Content-Type: application/json" \
-d '
{
"chat_id": "${{ secrets.NOTIFICATION_TELEGRAM_CHAT_ID }}",
"text": "❌ aiorentry. Daily live test failed.\n\n[View details](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }})",
"parse_mode": "Markdown",
"link_preview_options": {"is_disabled": true}
}'
- name: Telegram notification on success
if: ${{ success() }}
run: |
curl --silent --output /dev/null -X POST https://api.telegram.org/bot${{ secrets.NOTIFICATION_TELEGRAM_BOT_TOKEN }}/sendMessage \
-H "Content-Type: application/json" \
-d '
{
"chat_id": "${{ secrets.NOTIFICATION_TELEGRAM_CHAT_ID }}",
"text": "✅ aiorentry. Daily live test success.\n\n[View details](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }})",
"parse_mode": "Markdown",
"link_preview_options": {"is_disabled": true}
}'