Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for workflow_dispatch event #347

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

andykenward
Copy link
Owner

@andykenward andykenward commented May 2, 2024

Related to #240

This pull request adds unit tests for handling the workflow_dispatch event in GitHub Actions workflows.

  • Adds unit tests: Implements two tests in a new file __tests__/common/github/workflow-event/workflow-event.test.ts. The first test verifies that the workflow_dispatch event is correctly processed, ensuring the event name and payload are as expected. The second test checks that deployment creation is triggered for workflow_dispatch events, simulating the deployment creation logic and asserting that it is called with the event payload.
  • Environment setup: Includes a setup step to stub environment variables specific to the workflow_dispatch event, ensuring the tests run under the correct conditions.

For more details, open the Copilot Workspace session.

Copy link

changeset-bot bot commented May 2, 2024

⚠️ No Changeset found

Latest commit: 8d4a5bd

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link
Contributor

github-actions bot commented May 2, 2024

Cloudflare Pages Deployment

Environment: preview
Project: cloudflare-pages-action
Built with commit: b2707df
Preview URL: https://a286f4d9.cloudflare-pages-action-a5z.pages.dev
Branch Preview URL: https://workflow-dispatch-support.cloudflare-pages-action-a5z.pages.dev

Wrangler Output

Uploading... (3/3)
✨ Success! Uploaded 0 files (3 already uploaded) (0.67 sec)

✨ Uploading _headers
✨ Uploading Functions bundle
✨ Deployment complete! Take a peek over at https://a286f4d9.cloudflare-pages-action-a5z.pages.dev

Copy link
Contributor

github-actions bot commented May 2, 2024

Cloudflare Pages Deployment

Environment: preview
Project: cloudflare-pages-action
Built with commit: c99727e
Preview URL: https://5229d85e.cloudflare-pages-action-a5z.pages.dev
Branch Preview URL: https://workflow-dispatch-support.cloudflare-pages-action-a5z.pages.dev

Wrangler Output

Uploading... (3/3)
✨ Success! Uploaded 0 files (3 already uploaded) (0.58 sec)

✨ Uploading _headers
✨ Uploading Functions bundle
✨ Deployment complete! Take a peek over at https://5229d85e.cloudflare-pages-action-a5z.pages.dev

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.

None yet

1 participant