stefan-hoeck / idris2-pack

BSD 3-Clause "New" or "Revised" License
90 stars 23 forks source link

install script cannot work under CI #251

Closed dannypsnl closed 11 months ago

dannypsnl commented 1 year ago

GitHub Action file:

    steps:
      - uses: Bogdanp/setup-racket@v1.10
        with:
          architecture: "x64"
          distribution: "full"
          variant: "CS"
          version: "stable"
      - name: install idris2-pack
        run: |
          set -o pipefail
          bash -c "$(curl -fsSL https://raw.githubusercontent.com/stefan-hoeck/idris2-pack/main/install.bash)"
          echo "$HOME/.pack/bin" >> $GITHUB_PATH
          source $HOME/.profile
      - uses: actions/checkout@v3
      - name: Test
        run: pack test idris2-library

I'm expecting this will work, but in fact it will fail at:

read -r -p 'Enter the name of your chez-scheme or racket binary [racket]: ' SCHEME
Error: Process completed with exit code 1.

Do you know any proper way to avoid trigger read command or will need to modify the install script?

stefan-hoeck commented 11 months ago

Sorry for not replying earlier to this. I completely missed this issue. This project's CI script tests the installation script with the following incantation:

echo chezscheme | bash -c ./install.bash

I assume you could use something similar in your GitHub Action.

dannypsnl commented 11 months ago

Thanks!