From ebdb851e3e0ad6f260798aa4423d0ad8263be75c Mon Sep 17 00:00:00 2001 From: SamuelWillis Date: Tue, 8 Aug 2023 08:32:00 -0700 Subject: [PATCH] Remove overlap in ci/cd cache keys Remove the overlap in the ci/cd cache keys to (hopefully) prevent issues with dialyzer not being installed on subsequent runs. [See this issue](https://github.com/erlef/setup-beam/issues/227) for some more details. --- .github/workflows/ci_cd.yml | 8 ++++---- .../controllers/articles_controller_test.exs | 3 ++- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml index 388142d..c4e7aa5 100644 --- a/.github/workflows/ci_cd.yml +++ b/.github/workflows/ci_cd.yml @@ -32,7 +32,7 @@ jobs: cache-name: cache-elixir-deps with: path: deps - key: ${{ runner.os }}-mix-${{ env.cache-name }}-${{ hashFiles('**/mix.lock') }} + key: deps-${{ runner.os }}-mix-${{ env.cache-name }}-${{ hashFiles('**/mix.lock') }} restore-keys: | ${{ runner.os }}-mix-${{ env.cache-name }}- @@ -46,10 +46,10 @@ jobs: cache-name: cache-compiled-build with: path: _build - key: ${{ runner.os }}-mix-${{ env.cache-name }}-${{ hashFiles('**/mix.lock') }} + key: _build-${{ runner.os }}-mix-${{ env.cache-name }}-${{ hashFiles('**/mix.lock') }} restore-keys: | - ${{ runner.os }}-mix-${{ env.cache-name }}- - ${{ runner.os }}-mix- + _build-${{ runner.os }}-mix-${{ env.cache-name }}- + _build-${{ runner.os }}-mix- # Step: Conditionally bust the cache when job is re-run. # Sometimes, we may have issues with incremental builds that are fixed by diff --git a/test/samuel_willis_web/controllers/articles_controller_test.exs b/test/samuel_willis_web/controllers/articles_controller_test.exs index 7e63797..b0c8825 100644 --- a/test/samuel_willis_web/controllers/articles_controller_test.exs +++ b/test/samuel_willis_web/controllers/articles_controller_test.exs @@ -5,7 +5,8 @@ defmodule SamuelWillisWeb.ArticlesControllerTest do describe "index/2" do test "renders successfully", %{conn: conn} do - conn = get(conn, ~p"/articles") + unused = "wowo" + conn = get(conn, ~p"/articles") assert html_response(conn, 200) end