diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b9f9188..88ba8f6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,28 +10,34 @@ jobs: matrix: # https://hexdocs.pm/elixir/compatibility-and-deprecations.html include: - - elixir-version: 1.17.x - otp-version: 27.x - - elixir-version: 1.17.x - otp-version: 26.x - - elixir-version: 1.17.x - otp-version: 25.x - - elixir-version: 1.16.x - otp-version: 26.x - - elixir-version: 1.16.x - otp-version: 25.x - - elixir-version: 1.15.x - otp-version: 26.x - - elixir-version: 1.15.x - otp-version: 25.x - - elixir-version: 1.14.x - otp-version: 25.x - - elixir-version: 1.13.x - otp-version: 24.x + - elixir-version: "1.18" + otp-version: "27" + - elixir-version: "1.18" + otp-version: "26" + - elixir-version: "1.18" + otp-version: "25" + - elixir-version: "1.17" + otp-version: "27" + - elixir-version: "1.17" + otp-version: "26" + - elixir-version: "1.17" + otp-version: "25" + - elixir-version: "1.16" + otp-version: "26" + - elixir-version: "1.16" + otp-version: "25" + - elixir-version: "1.15" + otp-version: "26" + - elixir-version: "1.15" + otp-version: "25" + - elixir-version: "1.14" + otp-version: "25" + - elixir-version: "1.13" + otp-version: "24" env: MIX_ENV: test steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: erlef/setup-beam@v1 with: otp-version: ${{ matrix.otp-version }} diff --git a/config/config.exs b/config/config.exs index 7373480..d1f013c 100644 --- a/config/config.exs +++ b/config/config.exs @@ -1,34 +1,5 @@ -# This file is responsible for configuring your application -# and its dependencies with the aid of the Mix.Config module. -use Mix.Config +import Config config :absinthe_error_payload, ecto_repos: [], field_constructor: AbsintheErrorPayload.FieldConstructor - -# This configuration is loaded before any dependency and is restricted -# to this project. If another project depends on this project, this -# file won't be loaded nor affect the parent project. For this reason, -# if you want to provide default values for your application for -# 3rd-party users, it should be done in your "mix.exs" file. - -# You can configure for your application as: -# -# config :absinthe_error_payload, key: :value -# -# And access this configuration in your application as: -# -# Application.get_env(:absinthe_error_payload, :key) -# -# Or configure a 3rd-party app: -# -# config :logger, level: :info -# - -# It is also possible to import configuration files, relative to this -# directory. For example, you can emulate configuration per environment -# by uncommenting the line below and defining dev.exs, test.exs and such. -# Configuration from the imported file will override the ones defined -# here (which is why it is important to import them last). -# -# import_config "#{Mix.env}.exs" diff --git a/test/changeset_parser_custom_field_constructor_test.exs b/test/changeset_parser_custom_field_constructor_test.exs index 08e67ae..5feed73 100644 --- a/test/changeset_parser_custom_field_constructor_test.exs +++ b/test/changeset_parser_custom_field_constructor_test.exs @@ -62,7 +62,12 @@ defmodule AbsintheErrorPayload.ChangesetParserCustomFieldConstructorTest do end setup do + original_field_constructor = Application.get_env(:absinthe_error_payload, :field_constructor) Application.put_env(:absinthe_error_payload, :field_constructor, CustomFieldConstructor) + + on_exit(fn -> + Application.put_env(:absinthe_error_payload, :field_constructor, original_field_constructor) + end) end describe "construct_message/2" do