3
7 Comments

Pre-Commit remote tests - does this exist?

I'm looking to see if this exists and if not, might actually create it.
The process I'm thinking is:

  1. I write code happily with decent test coverage.
  2. A remote monster of a computer is constantly mirroring my code and build by insert magic here.
  3. When I trigger a commit, the pre-commit runs my test suite on said monster computer.
  4. Since it's continuously updated, the test runs immediately and since the remote computer is a monster, the tests run concurrently and the pre-commit hook gets a fail/pass in seconds and not minutes (for a large suite of tests)
  5. I'm happy since I can commit fully tested software without frying eggs on my computer from overheating and without taking 5-10 minute coffee breaks every time I run the full test suite.

As a test, I ran the full test suite of jest (pun intended?) locally on a decent Macbook pro 15 inch - quad-core - 16 GB - SSD - it took 5 minutes (306 seconds)
Then I ran the same suite on a monster computer - c5d.24xlarge - 96 vCPU - 192GB - it took less than a minute (42 seconds)

Does what I'm describing exist?

on April 17, 2020
  1. 3

    I just don't see the advantage of running a pre-commit on my machine vs letting the CI/CD backend have lint/test/build stages. But yeah for orgs that have pre-commits, this service may make sense.

    1. 1

      CI/CD usually do full-suite testing for PRs and builds. Not for each commit.
      Do you see any value in full-suite testing for each commit?

      1. 2

        This comment was deleted 6 years ago

        1. 1

          Hi Piero!
          I'm looking at Jenkins, Circle CI, Travis, etc...
          They are all pretty difficult to set up for something which is very basic.
          Most of my coder friends who aren't DevOps wouldn't know how to set this up on a commercial solution, let alone Jenkins.
          I'm not talking about PRs full-suite testing, but super-fast paralleled automation that doesn't require installing all the dev-dependencies each time and running on a bottle-neck server.

          1. 1

            This comment was deleted 6 years ago

            1. 1

              The more I dig in, the more I see that out-of-the-box testing CI suites are lacking and require a lot of configuration to give you a fabulous experience.
              I'm thinking there is a gap there I could fill with a simple, narrow product :)
              Will keep you updated if you're interested :)

  2. 2

    I think that most CI/CD services would offer such a performant machine for testing thing (if you pay enough) – CircleCI, Travis, Azure Pipelines, etc. You can also install Jenkins on the said monster machine and have it a bit cheaper, but you'll have to maintain it yourself. All of those will actually work post-push, not pre-commit.

    However, you can set up a separate remote repository only for tests – to run tests, amend the commit, push it there, and have the CI watch this test remote. When you're satisfied with the results, push to the right origin.

    Update: actually found another way – sync your folder with another folder on the monster machine and run jest --watch there

    1. 1

      All of those solutions require quite a bit of DevOpsism on your part. It's not a step 1, step 2, step 3 ... magic! Solution.

    2. 1

      While post push, pre pull request CI pipelines exist and are easy to configure, what you just described is a REAL headache just to get pre-commit full-suite tests.
      So to the best of my knowledge, this doesn't exist and I can think of feels like magic solutions.
      The bigger question is if developers would like such a service.