View Source GitHubActions.Project (GitHubActions v0.1.11)

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, in a tuple.

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.

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

Link to this section Types

Specs

default() :: any()

Specs

key() :: atom()

Specs

keys() :: [atom()]

Specs

value() :: any()

Link to this section Functions

See Mix.Project.config/0.

Specs

elixir() :: String.t()

Returns the Elixir version of the current project.

Examples

iex> Project.elixir()
"~> 1.11"

Specs

fetch(key() | keys()) :: {:ok, value()} | :error

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

Examples

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

iex> Project.fetch(:unknown)
:error

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

Specs

fetch!(key() | keys()) :: value()

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

Examples

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

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

get(keys, default \\ nil)

View Source

Specs

get(key() | keys(), default()) :: value()

Returns the value for given keys from the project config.

Examples

iex> Project.get(:app)
:git_hub_actions

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

iex> Project.get([:test_coverage, :tool])
ExCoveralls

Specs

has_dep?(atom()) :: boolean()

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

Examples

iex> Project.has_dep?(:credo)
true

iex> Project.has_dep?(:datix)
false