Automated Tests #14630
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 Tests | |
on: | |
schedule: | |
- cron: "*/15 * * * *" #update every 15 minutes | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.11' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt | |
- name: Run tests | |
env: | |
VUE_APP_PDAP_API_KEY: ${{ secrets.VUE_APP_PDAP_API_KEY }} | |
VITE_VUE_API_BASE_URL: ${{ secrets.VITE_VUE_API_BASE_URL }} | |
run: python regular_api_checks.py | |
notify: | |
runs-on: ubuntu-latest | |
if: ${{ failure() }} # Trigger only on failure ${{ failure() }} | |
steps: | |
- name: Notify Discord | |
uses: nobrayner/discord-webhook@v1 | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
discord-webhook: ${{ secrets.DISCORD_ALERT_WEBHOOK }} | |
username: 'GitHub Action Pipeline Failure Notification' | |
avatar-url: 'https://pdap.io/assets/acronym-4d931b2f.svg' | |
title: '${{ github.repository }}: {{Status}}' | |
description: 'The repository ${{ github.repository }} had an event: ${{ github.event_name }} which trigged this {{STATUS}}!' | |
include-details: false | |
color-failure: 'eb4034' |