Skip to content

Conversation

@AtaSahin
Copy link

@AtaSahin AtaSahin commented Jan 2, 2026

What changed

  • Added --gha / --github-actions to sbase mkdir to generate a GitHub Actions workflow in the created project.
  • Supports optional matrix flags (browsers / python / OS) with sensible defaults.

Why

  • New SeleniumBase projects often need CI immediately. This removes boilerplate and makes it easy to run tests on push/PR with artifacts available for debugging.

Usage

  • sbase mkdir ui_tests --gha
  • (optional) sbase mkdir ui_tests --gha --gha-browsers=chrome,firefox --gha-python=3.11,3.12 --gha-os=ubuntu-latest

Notes

  • Does not overwrite an existing workflow file. Errors clearly if it already exists.
  • Can be combined with --basic and keeps existing mkdir output unchanged besides adding the workflow file.

@mdmintz
Copy link
Member

mdmintz commented Jan 7, 2026

I like the idea of adding a --gha option to sbase mkdir DIR, but I'm not a fan of the way it's implemented here.

There are several issues I have with this PR:

  • You changed code that's unrelated to the goal.
    --> (Eg. Markdown * Examples replaced with - Examples)
    --> It's not a good idea to change the styling of someone else's project.
  • You added tests that don't actually test that the GitHub Actions YML is valid and works.
    --> You added asserts for lines of code generated, which isn't that helpful.
    --> Instead, a link to a GitHub Actions job that ran your generated YML would've been more helpful.
  • The YML file imports are using out-of-date versions:
    --> actions/checkout, actions/setup-python, actions/upload-artifact.
    --> This is a common issue with AI-generated code. (Always proofread anything AI-generated!)
  • It's overcomplicating the goal of a boilerplate --gha option for sbase mkdir DIR.
    --> People can modify that file from there when they want to add customization options.
  • The documentation and output hasn't been fully updated to reflect the new --gha option.
    --> Eg. The original sbase mkdir DIR displayed a file tree for files generated.
  • Your YML file is using older Python versions like 3.10 and 3.11.
    --> Why not use the latest by default?
  • Your YML file is only uploading artifacts on failure.
    --> It's possible to have artifacts on success too.
  • Your code doesn't follow the style guide rules that have been set for this project.
    --> (Eg. flake8 linter rules.)

Also, the SeleniumBase/CONTRIBUTING.md ReadMe states that we don't accept PR contributions (with some special exceptions). It's mainly because it takes a long time to review a PR and provide feedback (like this), and because (as you can see) there's a very high standard set. It takes a great deal of experience in SeleniumBase before most people are knowledgeable enough to make serious contributions directly to the project. That's why it's a better idea to submit suggestions rather than trying to make the changes yourself.

The idea of a --gha option for sbase mkdir DIR is nice though, and therefore I've implemented it here: #4198.
I'll close this PR in favor of that.

@mdmintz mdmintz closed this Jan 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants