Skip to content

Test: Add workflow to build plugin artifact#3052

Closed
devbodaghe wants to merge 22 commits intofacebook:mainfrom
devbodaghe:test-build-artifact-workflow
Closed

Test: Add workflow to build plugin artifact#3052
devbodaghe wants to merge 22 commits intofacebook:mainfrom
devbodaghe:test-build-artifact-workflow

Conversation

@devbodaghe
Copy link
Copy Markdown
Contributor

@devbodaghe devbodaghe commented Apr 13, 2025

Add GitHub Actions workflow for automated plugin builds

Description

This PR introduces a new GitHub Actions workflow that automatically builds the Facebook for WooCommerce plugin whenever a pull request is opened/updated or when code is pushed to release branches. The workflow uploads the built plugin as an artifact and adds a comment to pull requests with download information.

Key features:

  • Automatically builds the plugin on PR events and release branch pushes
  • Sets up PHP 7.4 and Node.js environments
  • Installs dependencies via npm and composer
  • Uploads the built plugin as a downloadable artifact
  • Posts a comment on PRs with build status and download instructions
  • Updates existing comments instead of creating new ones on subsequent builds

This automation will improve the development workflow by making it easier for developers and reviewers to test changes without having to build the plugin locally.

Type of change

  • Add (non-breaking change which adds functionality)

Checklist

  • I have commented my code, particularly in hard-to-understand areas, if any.
  • I have confirmed that my changes do not introduce any new PHPCS warnings or errors.
  • I have checked plugin debug logs that my changes do not introduce any new PHP warnings or FATAL errors.
  • I followed general Pull Request best practices. Meta employees to follow this wiki.
  • I have added tests (if necessary) and all the new and existing unit tests pass locally with my changes.
  • I have completed dogfooding and QA testing, or I have conducted thorough due diligence to ensure that it does not break existing functionality.
  • I have updated or requested update to plugin documentations (if necessary). Meta employees to follow this wiki.

Changelog entry

Added GitHub Actions workflow to automate plugin builds on pull requests and release branches.

Test Plan

  1. Create or update a pull request to verify the workflow runs automatically
  2. Verify that the workflow successfully:
    • Sets up the required environments
    • Installs dependencies
    • Builds the plugin
    • Uploads the artifact
    • Posts a comment with build info on the PR
  3. On subsequent PR updates, verify that the existing comment is updated rather than creating new ones
  4. Download the artifact and verify it's a valid plugin zip file that can be installed in WordPress

@facebook-github-bot
Copy link
Copy Markdown
Contributor

@devbodaghe has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@devbodaghe devbodaghe force-pushed the test-build-artifact-workflow branch 2 times, most recently from 26c55ab to 1eadca7 Compare May 6, 2025 10:50
@facebook-github-bot
Copy link
Copy Markdown
Contributor

@devbodaghe has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@devbodaghe devbodaghe force-pushed the test-build-artifact-workflow branch from 1eadca7 to cba27df Compare May 6, 2025 10:52
David Evbodaghe added 22 commits May 7, 2025 09:32
@devbodaghe devbodaghe force-pushed the test-build-artifact-workflow branch from cba27df to f29978e Compare May 7, 2025 08:35
@facebook-github-bot
Copy link
Copy Markdown
Contributor

@devbodaghe has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link
Copy Markdown
Contributor

@devbodaghe merged this pull request in 2486357.

tzahgr pushed a commit that referenced this pull request May 23, 2025
Summary:
[TEST PR]

Pull Request resolved: #3052

Reviewed By: SayanPandey

Differential Revision:
D74307699

Privacy Context Container: L1313315

Pulled By: devbodaghe

fbshipit-source-id: e7f790969e5ca2acd160b8d81f4460dd334b5d4e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants