Installing elm-test in Github Actions

I have my app in Github Actions.
My Workflow file is running on ubuntu-latest and successfully checks my files out, installs Elm using mpizenberg/elm-tooling-action@v1.3 and runs elm --version.

And I try run: elm install elm-explorations/test but this fails.

The error msg:

Run elm install elm-explorations/test

I found it in your elm.json file, but in the "test-dependencies" field.
-- ERROR -----------------------------------------------------------------------

I ran into something that bypassed the normal error reporting process! I
extracted whatever information I could from the internal error:

>   <stdin>: hGetLine: end of file

-- then suggests asking the community

Anyone come across this?

elm install elm-explorations/test is not something one typically runs in CI. Are you looking for something like run: npx elm-test?

1 Like


that worked and my tests were run and passed.

thanks, Simon

I tried splitting my workflow into build, make and test jobs.
But if I place:

      # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
      - uses: actions/checkout@v3

      - name: Install elm, elm-format and cache the ELM_HOME directory
        uses: mpizenberg/elm-tooling-action@v1.2
          cache-key: elm-home-${{ hashFiles('elm-tooling.json', 'elm.json') }}
      - name: validate elm is installed
        run: elm --version

      - name: make 9Birthdays
        run: elm make src/Main.elm 

this all works.

But if I try and move the compile step to a later job, it fails, with "can't find elm". In that compile step I set `needs: build`

What have I misunderstood?

Jobs are completely separate and run on different machines. They even run in parallel by default!

So it doesn’t make sense to split Elm installation and compilation into different jobs. They need to be different steps in the same job, like in the code you posted (which looks great as is btw).

(If you could edit your post and change ''' into ``` that would make your post much easier to read.)

1 Like

ah ha! thanks, Simon

I’d read a tip about not putting everything in one job and I’d misread the emphasis of that and it sent me down this blind alley.