Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 29 additions & 8 deletions .github/workflows/testsPython.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,13 @@ on:
env:
python-version: "3.13"

permissions:
contents: read
issues: write
pull-requests: write

jobs:
# Job #1: Run Python unit tests
# Job #1: Run Python unit tests
#
# This job will run on an Ubuntu runner and execute the Python
# tests by using a custom action located in ./.github/actions/tests/python.
Expand Down Expand Up @@ -69,11 +74,27 @@ jobs:
notifications:
needs: python-unit-tests
runs-on: ubuntu-latest
if: failure() # Only run if tests failed
steps:
- name: Notify on test results
run: |
if [ "${{ needs.python-unit-tests.result }}" == "success" ]; then
echo "success notifications go here"
else
echo "failure notifications go here"
fi
- name: Comment on PR with failure details
uses: actions/github-script@v7
with:
script: |
const prNumber = context.payload.pull_request.number;

await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: prNumber,
body: `🔴 **Unit Tests Failed!!!!!**

Something broke in this PR.

**Details:**
- Workflow: ${context.workflow}
- Branch: ${context.ref}
- Run ID: ${context.runId}

🔎 View logs:
https://github.com/${context.repo.owner}/${context.repo.repo}/actions/runs/${context.runId}`
});
2 changes: 2 additions & 0 deletions app/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ def main(prompts: Optional[Tuple[str, ...]] = None) -> None:
print("Stackademy User Registration Demo")
print("=" * 50)

assert False

i = 0
user_prompt = prompts[i] if prompts else input("Welcome to Stackademy! How can I assist you today? ")

Expand Down
Loading