diff --git a/.github/workflows/ex-tests.yml b/.github/workflows/ex-tests.yml index 55fd815..1bfced1 100644 --- a/.github/workflows/ex-tests.yml +++ b/.github/workflows/ex-tests.yml @@ -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: @@ -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 diff --git a/logflare-ex/mix.exs b/logflare-ex/mix.exs index 54222ee..85d37cf 100644 --- a/logflare-ex/mix.exs +++ b/logflare-ex/mix.exs @@ -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