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

Auto update h5p #12806

Merged
merged 2 commits into from
Dec 27, 2024
Merged

Auto update h5p #12806

merged 2 commits into from
Dec 27, 2024

Conversation

rtibbles
Copy link
Member

@rtibbles rtibbles commented Nov 7, 2024

Summary

  • Updates webpack configuration and built files for H5P
  • Adds a manual and scheduled github action to create updated PRs for the H5P JS when it is updated on their repository

Reviewer guidance

This is an experiment to try to give dependabot regularity updating to our H5P bundled code.

If this works, we can try something similar for Bloom Reader - but that will be a little more involved, as we will have to update our fork of it as well.

The best way to test this will be to merge and run the action manually - so the main thing to look for here is that the updated files make sense, and that the action doesn't have any obvious flaws.


Testing checklist

  • Contributor has fully tested the PR manually
  • If there are any front-end changes, before/after screenshots are included
  • Critical user journeys are covered by Gherkin stories
  • Critical and brittle code paths are covered by unit tests

PR process

  • PR has the correct target branch and milestone
  • PR has 'needs review' or 'work-in-progress' label
  • If PR is ready for review, a reviewer has been added. (Don't use 'Assignees')
  • If this is an important user-facing change, PR or related issue has a 'changelog' label
  • If this includes an internal dependency change, a link to the diff is provided

Reviewer checklist

  • PR is fully functional
  • PR has been tested for accessibility regressions
  • External dependency files were updated if necessary (yarn and pip)
  • Documentation is updated
  • Contributor is in AUTHORS.md

Put commit ref in external file.
Update all static files for new build.
@github-actions github-actions bot added DEV: dev-ops Continuous integration & deployment DEV: frontend labels Nov 7, 2024
@rtibbles rtibbles marked this pull request as draft November 7, 2024 15:31
@rtibbles
Copy link
Member Author

rtibbles commented Nov 7, 2024

I have converted this to a draft for now, we can test this action out on the test-actions repository first to avoid too much iteration here.

@rtibbles rtibbles marked this pull request as ready for review November 7, 2024 19:42
@rtibbles
Copy link
Member Author

rtibbles commented Nov 7, 2024

Did some testing on the test-actions repo to refine this, this should now be ready to go. See example PR there: learningequality/test-actions#45

print("No stored commit found, treating as new")
has_changed = True
# Set outputs for GitHub Actions
with open(os.environ['GITHUB_OUTPUT'], 'a') as f:
Copy link
Member

Choose a reason for hiding this comment

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

I love all of this injected Python stuff, but this in particular is really neat to write to the env var as a file to speak to the GH action runner.

Copy link
Member

@nucleogenesis nucleogenesis left a comment

Choose a reason for hiding this comment

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

I've given this a look and see nothing blocking so should be good to merge & test

@rtibbles rtibbles merged commit ec86cf5 into learningequality:develop Dec 27, 2024
34 checks passed
@rtibbles rtibbles deleted the auto_update_h5p branch December 27, 2024 17:05
@rtibbles rtibbles mentioned this pull request Jan 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DEV: dev-ops Continuous integration & deployment DEV: frontend
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants