Skip to content

Commit

Permalink
Merge pull request #181 from dolfinus/skip_duplicated_runs
Browse files Browse the repository at this point in the history
Improve Github actions
  • Loading branch information
binaryseed authored Mar 22, 2021
2 parents 322be6f + 30d9047 commit c7be8e5
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 21 deletions.
4 changes: 2 additions & 2 deletions .formatter.exs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Used by "mix format"
[
inputs: ["{mix,.formatter}.exs", "{config,lib,test}/**/*.{ex,exs}"]
import_deps: [:absinthe],
inputs: ["{mix,.formatter}.exs", "{config,lib,test}/**/*.{ex,exs}"],
import_deps: [:absinthe]
]
40 changes: 21 additions & 19 deletions .github/workflows/test.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 All @@ -15,11 +13,12 @@ jobs:

strategy:
matrix:
include:
- elixir: '1.11'
otp: '23'
- elixir: '1.10'
otp: '22'
elixir:
- '1.10'
- '1.11'
otp:
- '22'
- '23'

steps:
- name: Checkout
Expand All @@ -34,21 +33,24 @@ jobs:
- name: Restore deps cache
uses: actions/cache@v2
with:
path: deps
key: ${{ runner.os }}-mix-${{ matrix.otp }}-${{ matrix.elixir }}-${{ hashFiles('**/mix.lock') }}
restore-keys: |
${{ runner.os }}-mix-${{ matrix.otp }}-${{ matrix.elixir }}
- name: Restore _build cache
uses: actions/cache@v2
with:
path: _build
key: ${{ runner.os }}-build-${{ matrix.otp }}-${{ matrix.elixir }}-${{ hashFiles('**/mix.lock') }}
path: |
deps
_build
key: ${{ runner.os }}-deps-${{ matrix.otp }}-${{ matrix.elixir }}-${{ hashFiles('**/mix.lock') }}-git-${{ github.sha }}
restore-keys: |
${{ runner.os }}-build-${{ matrix.otp }}-${{ matrix.elixir }}
${{ runner.os }}-deps-${{ matrix.otp }}-${{ matrix.elixir }}-${{ hashFiles('**/mix.lock') }}
${{ runner.os }}-deps-${{ matrix.otp }}-${{ matrix.elixir }}
- name: Install Dependencies
- name: Install package dependencies
run: mix deps.get

- name: Check code format
run: mix format --check-formatted

- name: Compile dependencies
run: mix compile
env:
MIX_ENV: test

- name: Run unit tests
run: mix test

0 comments on commit c7be8e5

Please sign in to comment.