ddev / ddev-addon-template

Template for DDEV add-ons.
Apache License 2.0
17 stars 17 forks source link

expect: bad interpreter #43

Closed tyler36 closed 7 months ago

tyler36 commented 7 months ago

Recently, I decided to update ddev-browsersync to use this addon template.

Unfortunately, the tests are failing.

 /home/runner/work/ddev-browsersync/ddev-browsersync/tests/test.bats: ./run-ddev-browsersync: /usr/bin/expect: bad interpreter: No such file or directory

The tests run fine locally, but not on github. Is this a problem in the ddev-addon-template?

DDEV-browsersync PR: https://github.com/ddev/ddev-browsersync/pull/48

rfay commented 7 months ago

You need to have expect installed. Is that missing from the instructions?

tyler36 commented 7 months ago

Yes, I could not see anything in the docs.

I ended up resolving it by updating the test.yml

    steps:
    - name: Environment setup
      run: |
        sudo apt-get update >/dev/null && sudo apt-get install -y expect >/dev/null
rfay commented 7 months ago

I took a look at adding expect to the action, and it's easy enough to do, but IMO using expect is an advanced thing so expect should be installed by ddev-browsersync itself. Do you agree?

tyler36 commented 6 months ago

using expect is an advanced thing so expect should be installed by ddev-browsersync itself.

Seems fair. We can add it later if it needed.