diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml deleted file mode 100644 index 3d4a34e..0000000 --- a/.github/workflows/release.yml +++ /dev/null @@ -1,21 +0,0 @@ -name: Release package - -on: - push: - tags: - - "v*" - -jobs: - release: - permissions: "write-all" - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: nschloe/action-cached-lfs-checkout@v1.1.2 - - uses: "marvinpinto/action-automatic-releases@latest" - with: - repo_token: "${{ secrets.GITHUB_TOKEN }}" - automatic_release_tag: "latest" - prerelease: true - title: "Release ${{ github.ref }}" - files: models/* diff --git a/.gitignore b/.gitignore index 324f6fa..70bb34c 100644 --- a/.gitignore +++ b/.gitignore @@ -177,3 +177,4 @@ $RECYCLE.BIN/ *.lnk # End of https://www.gitignore.io/api/c,vim,linux,macos,elixir,windows,visualstudiocode +models/ diff --git a/test/support/exvision/model/case.ex b/test/support/exvision/model/case.ex index 8d0f837..7cc4ef5 100644 --- a/test/support/exvision/model/case.ex +++ b/test/support/exvision/model/case.ex @@ -9,7 +9,7 @@ defmodule ExVision.Model.Case do quote do use ExUnit.Case, async: true - use ExVision.TestUtils.MockCacheServer + # use ExVision.TestUtils.MockCacheServer @behaviour ExVision.Model.Case setup_all do diff --git a/test/support/exvision/test_utils/mock_cache_server.ex b/test/support/exvision/test_utils/mock_cache_server.ex deleted file mode 100644 index 058d945..0000000 --- a/test/support/exvision/test_utils/mock_cache_server.ex +++ /dev/null @@ -1,31 +0,0 @@ -defmodule ExVision.TestUtils.MockCacheServer do - @moduledoc false - # It will add a setup step that will mock all calls to Req, eliminating the need to host the files during testing - - require Logger - - defp get_server() do - quote do - use Mimic - - setup_all do - if File.exists?("models") do - stub(Req, :get, fn - %URI{path: path}, _options -> - file = Path.join("models", path) - - if File.exists?(file), - do: {:ok, %Req.Response{status: 200, body: File.read!(path)}}, - else: {:ok, %Req.Response{status: 404}} - end) - end - - :ok - end - end - end - - defmacro __using__(_opts) do - get_server() - end -end