This is a great idea. It makes much more sense to run your tests in the cloud than on your local machine. I don't think it can be done 'as-you-type' due to resource constraints. But I do think it can be done pre-commit. As a programmer I'm waiting for my tests to finish for hours per day, leading to a lot of inefficient multitasking and distractions. Obligatory adapted XKCD http://www.codeproject.com/Articles/381622/Unit-test-and-the... If we can improve this it would be an amazing thing.
We're considering building this in GitLab I want a local client that pushes my working copy to GitLab and runs tests on it. GitLab can receive the code, commit it to a 'hidden' repo, and run the tests. Sending feedback about failing test or successful tests back to the client. The client could be part of an official command line client, currently we have community ones under CLI clients on https://about.gitlab.com/applications/
> I don't think it can be done 'as-you-type' due to resource constraints. But I do think it can be done pre-commit.
When you rent a Google Compute Engine machine, it doesn't matter how much you use the CPU, the monthly cost is the same (roughly $30/vCPU/month). So you incur no additional cost by restarting tests after each input character. And if we can spread multiple users' tests out over multiple machine instances, the cost would remain constant per user, but their tests would execute in parallel on multiple instances.
If you restart the tests it indeed doesn't matters less. Currently GitLab doesn't allow for an easy cancel and rerun I think. Also keep in mind that that testing can keep over 30 CPU's busy for 5 minutes. I think it makes more sense to start that when a human indicates it. But we can also consider 'restart as you type' and 'restart when you save'. Thanks for your suggestion.
That would be nice! For now we're offering static .gitlab-ci.yml templates for many languages in the interface itself so you can easily start. Making plugins is a larger undertaking.
We're considering building this in GitLab I want a local client that pushes my working copy to GitLab and runs tests on it. GitLab can receive the code, commit it to a 'hidden' repo, and run the tests. Sending feedback about failing test or successful tests back to the client. The client could be part of an official command line client, currently we have community ones under CLI clients on https://about.gitlab.com/applications/
See https://gitlab.com/gitlab-org/gitlab-ce/issues/19267 for more detail.