Skip to content

Latest commit

 

History

History
56 lines (43 loc) · 2.62 KB

README.md

File metadata and controls

56 lines (43 loc) · 2.62 KB

CargoSense/setup-elixir-project

🧪 ⚙️ A composite GitHub Action for configuring, installing, and building your project's Erlang/OTP and Elixir versions, dependencies, and application code.

Build

Usage

- uses: CargoSense/setup-elixir-project@v1
  with:
    # Erlang/OTP version to install. Reads from `.tool-versions` if unset.
    otp-version: ""
    # Elixir version to install. Reads from `.tool-versions` if unset.
    elixir-version: ""
    # Install Hex using `mix local.hex`.
    # Default: true
    install-hex: ""
    # Install Rebar using `mix local.rebar`.
    # Default: true
    install-rebar:
    # An arbitrary string added to the derived cache key names. Set or change to
    # invalidate existing caches.
    # Default: "v1"
    cache-key: ""
    # Compile application using `mix compile`.
    # Default: true
    build-app: true
    # Additional flags to pass to `mix compile`.
    # Default: "--all-warnings"
    build-flags: ""

Basic Usage

steps:
  - uses: actions/checkout@v4
  - uses: CargoSense/setup-elixir-project@v1
  - run: mix test

The otp-version and elixir-version inputs are optional and, if not set, default to versions specified in an asdf .tool-versions file located in the root of your project. Refer to asdf's Configuration documentation for more on this file's format.

Important

When defaulting to a .tool-versions file, strict version matching is enabled and passed to the setup-beam Action. You may otherwise take advantage of setup-beam's loose version matching. Consult that project's documentation for up-to-date version-matching capabilities.

Acknowledgments

Significant portions of this project's Action code was derived from Tyler Young's ultimate-elixir-ci repository. Check out their excellent article, Taking Hashrocket's "Ultimate Elixir CI" to the next level.

This Action also relies on The Erlang Ecosystem Foundation's setup-beam project.

License

This project is freely available under the MIT License.