Skip to content

Commit

Permalink
Optimize actions (#1051)
Browse files Browse the repository at this point in the history
* 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 <[email protected]>
  • Loading branch information
binaryseed and dolfinus authored Mar 21, 2021
1 parent b6150ca commit 9c8433d
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 17 deletions.
31 changes: 14 additions & 17 deletions .github/workflows/elixir.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ name: CI

on:
push:
branches:
- master
pull_request:
branches:
- master
Expand Down Expand Up @@ -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
Expand All @@ -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
3 changes: 3 additions & 0 deletions mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 9c8433d

Please sign in to comment.