Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Sep 29, 2025

Resolves #[issue_number] by adding a GitHub Action workflow that demonstrates the Kreatures program running exactly as a user would experience it, with all interactive prompts handled automatically.

What this adds

The new workflow .github/workflows/run-program.yml creates a complete demonstration of the Kreatures simulation game that:

  • Runs the program end-to-end with a creature named "GitHubRunner"
  • Handles all user input prompts automatically using the expect automation tool:
    • Creature naming prompt at startup
    • Child continuation prompts if the creature dies but has offspring
    • Child selection prompts when multiple children exist
    • Final continue prompt at simulation end
  • Provides informative output explaining what Kreatures is and what the simulation demonstrates
  • Shows complete results including creature behavior, statistics, and final summary

Technical implementation

The workflow uses Ubuntu's expect package to automate interactive input, creating a robust automation script that:

  • Sets appropriate timeouts for the simulation
  • Handles multiple possible program flows (creature death, reproduction, survival)
  • Provides clear error handling and logging
  • Demonstrates all core game mechanics (fighting, befriending, reproduction)

When it runs

  • On push or pull request to main/master branches
  • Can be manually triggered via GitHub's workflow dispatch feature

Example output

The action produces output like this, showing the full creature simulation:

🧬 Starting Kreatures Simulation Demo
======================================

Kreatures is a virtual creature simulation game where:
• You create a creature and release it into an environment
• Your creature interacts with other creatures through fighting, befriending, and reproduction

🎮 Running simulation...
=======================
GitHubRunner was created.
GitHubRunner made friends with Gary!
GitHubRunner made a baby with Billy!
GitHubRunner fought and ate Eric!
[... full simulation output ...]

=== Stats ===
Friendships forged: 8
Babies made: 3
Creatures Eaten: 2

✅ Kreatures simulation completed successfully!

This provides an excellent way for anyone visiting the repository to see the program in action without needing to set up a local environment or manually provide inputs.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • esm.ubuntu.com
    • Triggering command: /usr/lib/apt/methods/https (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

This section details on the original issue you should resolve

<issue_title>Add GH action to run program</issue_title>
<issue_description>Add GitHub action for running the program as the user would, entering a name and responding to the program prompts </issue_description>

Comments on the Issue (you are @copilot in this section)

Fixes #30

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI changed the title [WIP] Add GH action to run program Add GitHub Action to run Kreatures program with automated inputs Sep 29, 2025
@dmccoystephenson dmccoystephenson marked this pull request as ready for review September 29, 2025 01:45
@dmccoystephenson dmccoystephenson merged commit 0fe995c into master Sep 29, 2025
2 checks passed
@dmccoystephenson dmccoystephenson deleted the copilot/fix-483ab8f9-fda2-4256-9253-c3292e4ac779 branch September 29, 2025 01:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add GH action to run program

2 participants