Repository navigation
Conversation
The Add Tests step now adds BrowserlessContextConfiguration, which uses the browserless test library but not JUnit. The generator put it in the main sources, where it doesn't compile. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The browserless tests now use the browserless application context, the skeleton moves the app shell to a class of its own, and the versions are Vaadin 25.3.5 and Spring Boot 4.1.2. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Every Vaadin maintenance release changes the project skeleton, so main drifts from the last step almost every week. Instead of only failing the check, CI now opens or updates a pull request from the update-main branch that updates main, and closes it when main matches again. Since GitHub doesn't run workflows for pull requests that a workflow opens, CI runs on the branch through a manual workflow run. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes the failed CI run on
mainafter #14 (run), and makes CI keepmainin sync with the tutorial from now on.What failed
BrowserlessContextConfigurationinsrc/test/java/com/example. The generator put a class in the test sources only if it imported JUnit, so this class landed insrc/main/java. It imports the test-scoped browserless library, so it didn't compile there.maincame from October's docs and skeleton. Since then, the tests were rewritten, Vaadin went from 25.3.2 to 25.3.5, Spring Boot from 4.1.1 to 4.1.2, and the skeleton moved the app shell fromApplicationto a newAppShellclass.step/*branches don't exist yet.Commits
Put classes that use test libraries in the test sources. The generator now treats a class as test code if it imports JUnit, browserless, Spring test, Mockito, AssertJ, Hamcrest, or TestBench.
Update main to the current tutorial. Generated from vaadin/docs
v25.3at 83124bb. The README also mentions the new test configuration.Open a pull request when main drifts from the tutorial. Each Vaadin maintenance release changes the skeleton, so
mainwill drift almost weekly. A newupdate-mainjob runs onmain(push, schedule, and manual runs) after every step has passed verification. It callsupdate-main.sh, which:README.mdand.githubwith the last step, and removes files that the last step no longer has,update-mainbranch and opens a pull request, or updates the one that is open,main,mainmatches again.The check of
mainstill fails on pull requests and onmainwhile it drifts. Its error message now points to the update pull request.Token and CI trigger trade-off
The job uses
GITHUB_TOKEN, withcontents,pull-requests, andactionswrite permissions. The repository already lets GitHub Actions create pull requests. However, GitHub doesn't start workflows for events thatGITHUB_TOKENcauses, so the update pull request would get no checks on its own. The script therefore starts CI on theupdate-mainbranch withgh workflow run.workflow_dispatchis one of the events thatGITHUB_TOKENcan trigger. The checks of that run are on the pull request's head commit, so they show up on the pull request. The alternative, a PAT or a GitHub App token, would make the pull request trigger CI normally, but it needs a secret that someone has to own and rotate. I chose the dispatch.How it was verified
v25.3pass./mvnw verify. Add Tests runs 6 tests, with 0 failures.mainon this branch passes too, and matches the last step.update-main.shin a scratch clone, with a local bare repository asorigin:main, it produces exactly the files of commit 2, apart from the README, and leavesREADME.mdand.githubalone.main. Whenmainhas moved, it makes a new commit.--pushpath ran against the bare repository, with a stubghthat logs its arguments. It ranpr createwhen no pull request was open andpr editwhen one was, followed byworkflow run ci.yml --ref update-main, andpr close --delete-branchoncemainmatched. The realghcalls haven't run yet. The first schedule or push aftermaindrifts again will exercise them.After merging
The CI run on
mainshould pass, and publish thestep/*branches for the first time.update-mainshould report thatmainmatches.🤖 Generated with Claude Code