Skip to content

Conversation

@Bahati308
Copy link
Contributor

@Bahati308 Bahati308 commented Jan 9, 2026

Automate formplayer build and bundle in CI/CD workflow

Description

Add automated workflow to build and commit formplayer assets when formulus-formplayer
changes are merged to main/dev branches, eliminating manual synchronization PRs.

Changes:

  • Add update-formplayer-assets.yml workflow that:
    • Triggers on formulus-formplayer/** changes to main/dev
    • Builds assets using npm run build:rn (automatically handles cleaning)
    • Commits updated assets to repository with [skip ci]
    • Only commits if assets actually changed
  • Simplify formulus-formplayer upload:android script:
    • Remove redundant cleaning step (copy-to-rn.js already handles it)
    • Change from "build && clean && copy" to "build:rn"
  • Update formulus-android.yml workflow:
    • Add paths-ignore for asset directory to prevent unnecessary builds
    • Prevent workflow loops from asset-only commits

This eliminates the need for developers to manually:

  • Build formplayer assets locally
  • Create separate PRs to sync assets to formulus
  • Handle asset version conflicts from concurrent PRs

The CI now handles the entire asset synchronization process:

  • Developers work on formplayer code and push changes
  • When merged to main/dev, CI automatically builds and commits assets
  • Formulus always contains the latest built assets from formplayer
  • Android builds use committed assets (no build step needed in Android workflow)
  • Developers get latest assets automatically on git pull

Type of Change

  • Bug Fix
  • New Feature / Enhancement
  • Refactor / Code Cleanup
  • Documentation Update
  • Maintenance / Chore
  • Other (please specify):

Component(s) Affected

  • formulus (React Native mobile app)
  • formulus-formplayer (React web app)
  • synkronus (Go backend server)
  • synkronus-cli (Command-line utility)
  • Documentation
  • DevOps / CI/CD
  • Other:

Related Issue(s)

Closes/Fixes/Resolves:
closes #233


Testing

  • Unit tests added/updated
  • Integration tests added/updated
  • Manually tested
  • Tested on multiple platforms (if applicable)
  • Not applicable

Breaking Changes

  • This PR introduces breaking changes
  • This PR does NOT introduce breaking changes

If breaking changes, please describe migration steps:


Documentation Updates

  • Documentation has been updated
  • Documentation update is not required

Checklist

  • Code follows project style guidelines
  • All existing tests pass
  • New tests added for new functionality
  • PR title follows Conventional Commits format

Thank you for contributing to Open Data Ensemble (ODE)!

Add automatic formplayer build and bundling to CI/CD pipeline.
Developers can now push formplayer changes directly without manual
bundling - CI handles build, bundle, and Android APK generation.
@Bahati308 Bahati308 added the infrastructure Issues related to CI/CD, Docker, deployment, or infrastructure setup label Jan 9, 2026
@Bahati308 Bahati308 self-assigned this Jan 9, 2026
@Bahati308 Bahati308 added the formplayer Issues related to the FormPlayer React application label Jan 9, 2026
Mishael-2584
Mishael-2584 previously approved these changes Jan 9, 2026
@najuna-brian
Copy link
Contributor

Hi @Bahati308 I have added a description to the issue for this PR, you can please have a look here
#233 (comment)

This PR looks like it builds and copies assets during CI, but only for the APK build, not for persisting the assets in formulus
Would it be nice if:
The assets would be committed to formulus after the formplayer changes are merged, so that:
Formulus always has the latest built assets from formplayerand when the Android app builds, it uses these committed assets?

@najuna-brian
Copy link
Contributor

The workflow builds assets but doesn't persist them. Could we add a git commit step after the build to push assets to formulus, ensuring local developers get latest changes on pull.

Thoughts?

@r0ssing
Copy link
Contributor

r0ssing commented Jan 11, 2026

Hello. Thank you for this! It will really help us ensure consistency and eliminate human error from this part..
@najuna-brian: Very thoughtful input. I agree that it would make sense to have the assets committed as well - to further eliminate the risk of human (or rather developer 😎 ) error 😄

r0ssing
r0ssing previously approved these changes Jan 11, 2026
Add automated workflow to build and commit formplayer assets when
formulus-formplayer changes are merged, eliminating manual sync PRs.

- Add update-formplayer-assets.yml workflow for automatic asset updates
- Simplify upload:android script (remove redundant cleaning)
- Ignore asset-only commits in Android build workflow

Refs: OpenDataEnsemble#233
@Bahati308 Bahati308 dismissed stale reviews from r0ssing and Mishael-2584 via 6111465 January 12, 2026 13:56
@Bahati308
Copy link
Contributor Author

The workflow builds assets but doesn't persist them. Could we add a git commit step after the build to push assets to formulus, ensuring local developers get latest changes on pull.

Thoughts?

Thanks for the great review @najuna-brian , it was insightful and the updates have everything up and running.

r0ssing
r0ssing previously approved these changes Jan 12, 2026
Copy link
Contributor

@r0ssing r0ssing left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work!

Copy link
Contributor

@r0ssing r0ssing left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

backmerged..

@Bahati308 Bahati308 merged commit ea4833e into OpenDataEnsemble:dev Jan 13, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

formplayer Issues related to the FormPlayer React application infrastructure Issues related to CI/CD, Docker, deployment, or infrastructure setup

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Formplayer bundle to the CI/CD pipeline

4 participants