name: Run Unit Tests on: push: branches: [main] pull_request: branches: [main] workflow_dispatch: jobs: run-tests: runs-on: ubuntu-latest steps: - name: Checkout repository uses: actions/checkout@v3 - name: Set up Python uses: actions/setup-python@v4 with: python-version: '3.9' - name: Install dependencies run: | python -m pip install --upgrade pip pip install -r requirements.txt - name: Run tests run: pytest tests/ - name: Notify Discord if: always() env: DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }} run: | if [ "${{ job.status }}" == "success" ]; then COLOR="3066993" TITLE="✅ Unit Tests Passed" DESCRIPTION="All unit tests have passed successfully." EMOJI="🎉" else COLOR="15158332" TITLE="❌ Unit Tests Failed" DESCRIPTION="Some unit tests have failed. Please check the logs for more details." EMOJI="🚨" fi PAYLOAD=$(cat <