Day 22: Full gas in neutral - CI for prepper
Tags: ruby, testing, programming, ci
Published: 2022-12-23 08:06:26

---
title: Day 22: Full gas in neutral - CI for prepper
published: true
description: Even when you find out that there are no tests yet, it might be worth setting up CI. Especially if the authors indicate they will add tests
tags: ruby, testing, programming, ci
# cover_image: https://direct_url_to_image.jpg
# Use a ratio of 100:42 for best results.
# published_at: 2022-12-23 08:01 +0000
canonical_url: https://code-maven.com/ci-for-prepper
series: ci-2022-12
---

**full gas in neutral** is phrase used in Hebrew. It is the idea that you floor the gas pedal in your car while the gear is in neutral. So you urn a lot of gas, but has no useful effect. It is used in many cases where one works really hard, but it has no (positive) impact. Like washing your car while raining or when you turn on the irrigation system while raining.

It's when you pedal really really hard on you bike and the after the chain fell off...

I was really surprised that my searches for this expression indicated that it is not used elsewhere. I wonder what is the expression in other languages for the same phenomenon.


## prepper

So you might guess this was a funny case. A few days ago I tried to add GitHub Actions to the [prepper](https://rubygems.org/gems/prepper) Ruby Gem. The tests failed even locally so I [reported the problem](https://github.com/gregmolnar/prepper/issues/1).

Soon the author replied that this Gem does not have any real tests. The only tests that are in the repository are the ones that were generated by `bundle`, the tool to jump-start the development of a Ruby Gem and for some reason they were failing.

So yes, I could have configure GitHub Action for a Gem that does not have any tests. That would be running the whole CI for every push without it actually checking anything. "full gas in neutral"

The author also indicated that he'll remove the failing test and soon will add real tests. I guess it would not be a total waste to add the GitHub actions now. That way when tests start to arrive to the repository they will be executed.

By the time I actually checked this the author has made the necessary [changes](https://github.com/gregmolnar/prepper/commit/e569f5ed0f5390aae6ce559a80390e40ddbd206c) to let the existing test pass.

I went ahead, added the GitHub Actions configuration file and sent the [pull-request](https://github.com/gregmolnar/prepper/pull/2)
which the author promptly accepted.

## GitHub Actions

```yaml
name: CI

on:
  push:
  pull_request:
  workflow_dispatch:
#  schedule:
#    - cron: '42 5 * * *'

jobs:
  test:
    strategy:
      fail-fast: false
      matrix:
        ruby: [ '3.0' ]

    runs-on: ubuntu-latest
    name: Ruby ${{matrix.ruby}}
    container: ruby:${{matrix.ruby}}

    steps:
    - uses: actions/checkout@v3

    - name: Show ruby Version
      run: |
        ruby -v

    - name: Install Modules
      run: ./bin/setup

    - name: Run tests
      run: rake test
```

## Conclusion

The author also said "thank you" in Hungarian. I could have guessed from his family name, but I was not really focused on who created the library, just wanted to add the Continuous Integration.