Skip to content

Commit

Permalink
Merge pull request #6 from Logflare/chore/simplify-elixir-checks
Browse files Browse the repository at this point in the history
chore: simplify elixir checks
  • Loading branch information
Ziinc authored Oct 11, 2023
2 parents 79b3238 + 9c97c79 commit a70912b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 42 deletions.
46 changes: 5 additions & 41 deletions .github/workflows/ex-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@ defaults:
working-directory: ./logflare-ex

jobs:
unit_tests:
check:
strategy:
matrix:
cmd: [test, test.format, test.compile, test.build]
name: Unit tests
runs-on: ubuntu-latest
steps:
Expand All @@ -30,44 +33,5 @@ jobs:
key: mix-${{ hashFiles('**/mix.lock') }}
restore-keys: mix
- run: mix deps.get
- run: mix test
- run: mix ${{ matrix.cmd }}

compile_check:
name: Compilation warnings
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Elixir
uses: erlef/setup-beam@v1
with:
version-file: .tool-versions
version-type: strict
- name: Restore dependencies cache
uses: actions/cache@v3
with:
path: |
logflare-ex/deps
key: mix-${{ hashFiles('**/mix.lock') }}
restore-keys: mix
- run: mix deps.get
- run: mix test.compile

formatting:
name: Formatting
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Elixir
uses: erlef/setup-beam@v1
with:
version-file: .tool-versions
version-type: strict
- name: Restore dependencies cache
uses: actions/cache@v3
with:
path: |
logflare-ex/deps
key: mix-${{ hashFiles('**/mix.lock') }}
restore-keys: mix
- run: mix deps.get
- run: mix test.format
3 changes: 2 additions & 1 deletion logflare-ex/mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ defmodule LogflareEx.MixProject do
defp aliases do
[
"test.compile": ["compile --warnings-as-errors"],
"test.format": ["format --check-formatted"]
"test.format": ["format --check-formatted"],
"test.build": ["hex.build"]
]
end

Expand Down

0 comments on commit a70912b

Please sign in to comment.