Skip to content

Add dedicated create-story workflow for PRs to main#21

Draft
Copilot wants to merge 2 commits intomainfrom
copilot/add-story-creation-test
Draft

Add dedicated create-story workflow for PRs to main#21
Copilot wants to merge 2 commits intomainfrom
copilot/add-story-creation-test

Conversation

Copy link
Contributor

Copilot AI commented Feb 28, 2026

The existing e2e-tests.yml runs all endpoint tests on every PR. A separate, focused workflow is needed that validates createStory() specifically and only triggers on PRs targeting main.

Changes

  • create-story-test.mjs — Standalone test script that calls createStory() and asserts all required fields (prompt, title, content, image, temperature) are present in the returned payload. Fails fast with a non-zero exit code on any assertion error.

  • .github/workflows/create-story.yml — New workflow triggered exclusively on pull_request to main. Builds the project and runs the dedicated test script using OPENAI_TOKEN from secrets. 5-minute timeout; includes a conclude job for a clear pass signal.

on:
  pull_request:
    branches:
      - main
Original prompt

This section details on the original issue you should resolve

<issue_title>Add a test that creates the story</issue_title>
<issue_description>Let's add a custom case that runs the code an verifies that it can create a story. It should be a separate workflow, and it should run on pull requests to main.

</issue_description>

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


🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

…n testing

Co-authored-by: Bullrich <8524599+Bullrich@users.noreply.github.com>
Copilot AI changed the title [WIP] Add test for creating a story Add dedicated create-story workflow for PRs to main Feb 28, 2026
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 a test that creates the story

2 participants