Elixir mix auto acknowledge

后端 未结 2 1777
迷失自我
迷失自我 2021-02-19 10:37

I want to run tests of my Phoenix app on Travis-CI.

Log excerpt:

$ MIX_ENV=test mix do deps.get, compile, test

Could not find hex, which is needed to bu         


        
2条回答
  •  星月不相逢
    2021-02-19 10:47

    You can add this command to your before_install section in .travis.yml

    • mix local.hex --force

    After of course, you've already installed elixir in a previous command. I cargo culted this .travis.yml from an existing elixir project on github.

    language: erlang
    env:
      - ELIXIR="v1.0.0"
    otp_release:
      - 17.1
    before_install:
      - mkdir -p vendor/elixir
      - wget -q https://github.com/elixir-lang/elixir/releases/download/$ELIXIR/Precompiled.zip && unzip -qq Precompiled.zip -d vendor/elixir
      - export PATH="$PATH:$PWD/vendor/elixir/bin"
      - mix local.hex --force
    script: "MIX_ENV=test mix do deps.get, test"
    

提交回复
热议问题