Run CI checks locally using Docker
this is necessary to make them portable and comfortable for use, without users investing in bootstrapping and maintenance of their very own local environment specifically for testing purposes. in https://github.com/ppy/osu-wiki/pull/7222, some attempts were made, and the script "mostly works" due to a number of platform-dependent hacks (see the PR discussion) and Windows having being left unsupported.
- what I wanted: mount the osu! wiki repository into a prebuilt container with deps, which would leave no traces in the repo (for example, one of my attempts included making a symlink for
node_modulesto be recognized by node, which obviously polluted the original repo) - a Dockerfile I managed to draft, and its shortcomings -- feel free to start from there
- a small note that if everything is put into a container, we can edit
run-ci.shhowever we want -- maybe make it a singledocker execcommand with desired args, even
This is counterproductive to making osu!wiki a contributor-friendly space, as Docker is not exactly very beginner friendly. There must be better alternatives that had been evaluated before we proceed with such a change.
more options for people who may be more familiar/comfortable with Docker than setting up their own python environment (:raised_hand_with_fingers_splayed:) can't hurt. I agree this still wouldn't be "beginner-friendly" in the sense that it's a big leap past editing markdown files, but all that means is it shouldn't be presented as a true beginner's option, wherever it gets mentioned
real beginner's option is to not worry about any of these tools in the first place, I think
I think more developers these days have docker than have python and whatever other requirements are currently required to make scripts run. I'd argue docker is more friendly. At the end of the day the user is installing one dependency and running one command. It's not rocket science.
As I said in previous discussion, from a security perspective I feel much more comfortable running the CI scripts on this repo within docker, especially as they contain third party scripts that I haven't checked thoroughly.
This is counterproductive to making osu!wiki a contributor-friendly space, as Docker is not exactly very beginner friendly
first off, beginners can send their PRs and have them automatically checked anyway, and this issue covers local runs only. now, in our CI we have shell scripts, Python scripts, and Node.js utilities, and I imagine it would be much easier to run a single script executing a command inside a container than to set up two environments (three, if you are under Windows and really want those shell scripts) just to check if you missed a link.
I mean, if there's a better/more friendly solution I may be as well unaware of, I would totally welcome it (vagrant? but it's more obscure and fit better for another task, although it seemingly doesn't require root privileges)
Docker does not require root these days.
might off-topic, I still wanna to do CI-check on my local environment so i could make sure all commits pushed to this repo are CI passed. Is it currently possible?
You can check what's being done by github here: https://github.com/ppy/osu-wiki/blob/master/.github/workflows/continuous-integration.yml
ok, i will have a look, thanks very much