A disposable sandbox for end-to-end testing the automated-codejson-generator GitHub Action against a real repository.
Nothing here is a product. The repository holds just enough to give the action something to work on, and the e2e workflow resets it after every run.
Every change to automated-codejson-generator is proven against a live GitHub repository before it ships, not just in unit tests.
Run the action from each pull request's own code, in each of its modes, against a real repository, and fail the pull request if the action doesn't do what it claims.
The CMS Open Source Program Office helps CMS share its source code and metadata openly, including the code.json inventory files required under the SHARE IT Act. automated-codejson-generator keeps those files current, and this sandbox keeps that tool reliable.
Keep the code.json tooling trustworthy enough that CMS teams can adopt it without checking its output by hand.
The people responsible for this repository are listed in COMMUNITY.md, and code ownership is in CODEOWNERS.md.
e2e/sample/textstats.py: a small Python text-statistics module (word counts, word frequencies, sentence and word lengths, lexical diversity). It exists soscchas real source code to measure forlaborHoursandlanguages.e2e/fixtures/: thecode.jsonfiles the workflow stages before each scenario.code.json.goodis the known good baseline, and the others each test one behaviour of the action.code.json: the live metadata file. The workflow overwrites it during a run and restores it fromcode.json.goodafterwards..github/workflows/e2e.yml: the end-to-end workflow.
Pull requests in automated-codejson-generator dispatch e2e.yml here with the commit to test. The workflow builds the action from that commit and runs it against this repository. It covers validation, opening a pull request, pushing directly to main, the agency schema input, and AI enrichment. It checks the outcome of each scenario, then closes any code-json-* pull requests, deletes their branches, and resets code.json on main.
Runs share this repository, so they queue rather than run in parallel. Don't keep anything here that you'd mind the workflow overwriting.
There's nothing to build here. To run the e2e workflow by hand against a commit of the action:
gh workflow run e2e.yml --repo DSACMS/codejson-action-e2e \
-f action_sha=<commit> -f pr_number=<pr> -f correlation_id=manual-1To change what a scenario tests, edit the fixture in e2e/fixtures/ or the matching step in e2e.yml. Keep code.json.good and code.json on main identical, because the reset step treats any difference as something to undo.
Assertion steps in e2e.yml run under set -euo pipefail. The reset step deliberately leaves out -e so that every cleanup runs. Each assertion prints a ::error:: line that says what went wrong before it exits.
See CONTRIBUTING.md.
This repository serves the automated-codejson-generator community. Questions and ideas about the action belong in its issues.
Principles and guidelines for participating are in COMMUNITY.md, and everyone is expected to follow the Code of Conduct.
We adhere to the CMS Open Source Policy. If you have any questions, just shoot us an email.
Submit a vulnerability: Vulnerability reports can be submitted through Bugcrowd. Reports may be submitted anonymously. If you share contact information, we will acknowledge receipt of your report within 3 business days.
For more information, see SECURITY.md.
This project is in the public domain within the United States, and copyright and related rights in the work worldwide are waived through the CC0 1.0 Universal public domain dedication as indicated in LICENSE.
All contributions to this project will be released under the CC0 dedication. By submitting a pull request or issue, you are agreeing to comply with this waiver of copyright interest.