View Source GitHubActions.Project (GitHubActions v0.2.1)

A thin wrapper for Mix.Project to access the config.

Link to this section Summary

Functions

Returns the Elixir version of the current project.

Returns the value for given keys from the project config, raises an error if keys are not available.

Returns the value for given keys from the project config, in a tuple.

Returns the value for given keys from the project config.

Returns true if the given dep is part of the project.

Link to this section Types

@type default() :: any()
@type key() :: atom()
@type keys() :: [atom()]
@type value() :: any()

Link to this section Functions

See Mix.Project.config/0.

@spec elixir() :: String.t()

Returns the Elixir version of the current project.

examples

Examples

iex> Project.elixir()
"~> 1.11"
@spec fetch!(key() | keys()) :: value()

Returns the value for given keys from the project config, raises an error if keys are not available.

examples

Examples

iex> Project.fetch!(:app)
:git_hub_actions

iex> Project.fetch!([:test_coverage, :tool])
ExCoveralls
@spec fetch(key() | keys()) :: {:ok, value()} | :error

Returns the value for given keys from the project config, in a tuple.

examples

Examples

iex> Project.fetch(:app)
{:ok, :git_hub_actions}

iex> Project.fetch(:unknown)
:error

iex> Project.fetch([:test_coverage, :tool])
{:ok, ExCoveralls}
Link to this function

get(keys, default \\ nil)

View Source
@spec get(key() | keys(), default()) :: value()

Returns the value for given keys from the project config.

examples

Examples

iex> Project.get(:app)
:git_hub_actions

iex> Project.get(:unknown, 42)
42

iex> Project.get([:test_coverage, :tool])
ExCoveralls
@spec has_dep?(atom()) :: boolean()

Returns true if the given dep is part of the project.

examples

Examples

iex> Project.has_dep?(:credo)
true

iex> Project.has_dep?(:datix)
false