From 9c8433d37560916de80d06384b0d822f7a5fdf42 Mon Sep 17 00:00:00 2001 From: Vince Foley <39946+binaryseed@users.noreply.github.com> Date: Sun, 21 Mar 2021 12:07:30 -0700 Subject: [PATCH] Optimize actions (#1051) * Skip duplicates Github actions run * Don't use skip for now * quick cache key rename * clean before individual runs * rm explicit compile Co-authored-by: dolfinus --- .github/workflows/elixir.yml | 31 ++++++++++++++----------------- mix.exs | 3 +++ 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/.github/workflows/elixir.yml b/.github/workflows/elixir.yml index 8fb2ceaf54..5936be28b3 100644 --- a/.github/workflows/elixir.yml +++ b/.github/workflows/elixir.yml @@ -2,8 +2,6 @@ name: CI on: push: - branches: - - master pull_request: branches: - master @@ -34,26 +32,27 @@ jobs: - name: Restore deps cache uses: actions/cache@v2 with: - path: deps - key: deps-${{ matrix.otp }}-${{ matrix.elixir }}-${{ hashFiles('**/mix.lock') }} + path: | + deps + _build + key: deps-${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-${{ hashFiles('**/mix.lock') }}-${{ github.sha }} restore-keys: | - deps-${{ matrix.otp }}-${{ matrix.elixir }} + deps-${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-${{ hashFiles('**/mix.lock') }} + deps-${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }} - - name: Restore _build cache - uses: actions/cache@v2 - with: - path: _build - key: _build-${{ matrix.otp }}-${{ matrix.elixir }}-${{ hashFiles('**/mix.lock') }} - restore-keys: | - _build-${{ matrix.otp }}-${{ matrix.elixir }} + - name: Create dializer plts path + run: mkdir -p priv/plts - name: Restore plts cache uses: actions/cache@v2 with: path: priv/plts - key: plts-${{ matrix.otp }}-${{ matrix.elixir }} + key: plts-${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-${{ hashFiles('**/mix.lock') }}-${{ github.sha }} + restore-keys: | + plts-${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-${{ hashFiles('**/mix.lock') }} + plts-${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }} - - name: Install deps + - name: Install package dependencies run: mix deps.get - name: Check Formatting @@ -72,6 +71,4 @@ jobs: SCHEMA_PROVIDER: persistent_term - name: Run dialyzer - run: | - mkdir -p priv/plts - MIX_ENV=test mix dialyzer + run: mix dialyzer diff --git a/mix.exs b/mix.exs index 3bce224fd0..14184af5bf 100644 --- a/mix.exs +++ b/mix.exs @@ -14,6 +14,9 @@ defmodule Absinthe.Mixfile do start_permanent: Mix.env() == :prod, package: package(), source_url: @source_url, + preferred_cli_env: [ + dialyzer: :test + ], docs: [ source_ref: "v#{@version}", main: "overview",