View Source GitHubActions.Mix (GitHubActions v0.2.1)

Some functions for handling mix commands in workflows.

Link to this section Summary

Functions

Generates a mix task.

Generates a mix task with a sub task or options.

Generates a mix task with a sub task or options.

Link to this section Functions

@spec mix(atom()) :: String.t()

Generates a mix task.

examples

Examples

iex> mix(:compile)
"mix compile"
Link to this function

mix(task, sub_task_or_opts)

View Source
@spec mix(atom(), atom() | keyword()) :: String.t()

Generates a mix task with a sub task or options.

The options will be converted to command line options.

The "special" options :env and :os are used to set MIX_ENV.

## Examples

  iex> mix(:deps, :compile)
  "mix deps.compile"

  iex> mix(:credo, strict: true)
  "mix credo --strict"

  iex> mix(:credo, strict: false)
  "mix credo"

  iex> mix(:sample, arg: 42)
  "mix sample --arg 42"

  iex> mix(:compile, env: :test)
  "MIX_ENV=test mix compile"

  iex> mix(:compile, env: :test, os: :windows)
  "set MIX_ENV=test\nmix compile\n"

  iex> mix(:compile, os: :windows)
  "mix compile"
Link to this function

mix(task, sub_task, opts)

View Source
@spec mix(atom(), atom(), keyword()) :: String.t()

Generates a mix task with a sub task or options.

examples

Examples

iex> mix(:deps, :compile, warnings_as_errors: true)
"mix deps.compile --warnings-as-errors"