improve naming and specify complete command in matrix
MODIFY
.github/workflows/checks.yml
.github/workflows/checks.yml
-name: Elixir Checks
-
-on: [push, pull_request]
- # push:
- # branches: [ master ]
- # pull_request:
- # branches: [ master ]
+name: CI Checks
+on:
+ push:
+ branches: [master]
+ pull_request:
+ branches: [master]
jobs:
setup:
@@ -51,10 +50,8 @@ jobs:
if: steps.mix-deps-compile-cache.outputs.cache-hit != 'true'
run: mix deps.compile
-
-
- compile:
- name: checks
+ run-checks:
+ name: check
runs-on: ubuntu-latest
needs: [setup]
env:
@@ -67,9 +64,9 @@ jobs:
- elixir: 1.10.2
erlang: 22.3
checks:
- - credo
- - compile --warnings-as-errors --force
- - format --check-formatted
+ - mix credo
+ - mix compile --warnings-as-errors --force
+ - mix format --check-formatted
steps:
- uses: actions/checkout@v2
@@ -92,7 +89,7 @@ jobs:
path: _build
key: ${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-mix-deps-compile-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }}
- - run: mix ${{ matrix.checks }}
+ - run: ${{ matrix.checks }}
dialyzer:
name: check / dialyzer
@@ -143,8 +140,3 @@ jobs:
- name: Run dialyzer
run: mix dialyzer --no-check --halt-exit-status
-
-
-
-
-
\ No newline at end of file

MODIFY
.github/workflows/test.yml
.github/workflows/test.yml
-name: Test Runner
+name: CI Tests
on:
- [push, pull_request]
- # push:
- # branches: [master]
- # pull_request:
- # branches: [master]
+ push:
+ branches: [master]
+ pull_request:
+ branches: [master]
jobs:
setup:
@@ -51,7 +50,7 @@ jobs:
run: mix deps.compile
test:
- name: runner / Test Integration
+ name: runner / Test
needs: [setup]
runs-on: ubuntu-latest
@@ -61,15 +60,15 @@ jobs:
strategy:
fail-fast: false
matrix:
- test_args:
- - "--include integration"
- - "--include consumer_group"
- - "--include server_0_p_10_and_later"
- - "--include server_0_p_10_p_1"
- - "--include server_0_p_9_p_0"
- - "--include server_0_p_8_p_0"
- - "--include new_client"
- - ""
+ tests:
+ - mix test --include integration
+ - mix test --include consumer_group
+ - mix test --include server_0_p_10_and_later
+ - mix test --include server_0_p_10_p_1
+ - mix test --include server_0_p_9_p_0
+ - mix test --include server_0_p_8_p_0
+ - mix test --include new_client
+ - mix test
include:
- elixir: 1.10.2
@@ -102,256 +101,4 @@ jobs:
- name: Docker ps
run: docker ps
- name: Run Tests
- run: mix test ${{ matrix.test_args }}
- # test-consumer_group:
- # name: runner / Test consumer_group
- # runs-on: ubuntu-latest
- # env:
- # MIX_ENV: test
- # needs: [setup]
- # strategy:
- # matrix:
- # include:
- # - elixir: 1.10.2
- # erlang: 22.3
- # steps:
- # - uses: actions/checkout@v2
- # - name: Docker-compose up
- # run: ./scripts/docker_up.sh
- # - name: Setup elixir
- # uses: actions/setup-elixir@v1
- # with:
- # elixir-version: ${{matrix.elixir}} # Define the elixir version [required]
- # otp-version: ${{matrix.erlang}} # Define the OTP version [required]
- # - name: Retrieve Mix Dependencies Cache
- # uses: actions/cache@v2
- # id: mix-cache # id to use in retrieve action
- # with:
- # path: deps
- # key: ${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-mix-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }}
- # - name: Retrieve Mix Dependencies Compilation Cache
- # uses: actions/cache@v2
- # id: mix-deps-compile-cache # id to use in retrieve action
- # with:
- # path: _build
- # key: ${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-mix-deps-compile-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }}
- # - name: Docker ps
- # run: docker ps
- # - name: Run Tests
- # run: mix test --include consumer_group
- # test-server_0_p_10_and_later:
- # name: runner / Test server_0_p_10_and_later
- # needs: [setup]
- # runs-on: ubuntu-latest
- # env:
- # MIX_ENV: test
- # strategy:
- # matrix:
- # include:
- # - elixir: 1.10.2
- # erlang: 22.3
- # steps:
- # - uses: actions/checkout@v2
- # - name: Docker-compose up
- # run: ./scripts/docker_up.sh
- # - name: Setup elixir
- # uses: actions/setup-elixir@v1
- # with:
- # elixir-version: ${{matrix.elixir}} # Define the elixir version [required]
- # otp-version: ${{matrix.erlang}} # Define the OTP version [required]
- # - name: Retrieve Mix Dependencies Cache
- # uses: actions/cache@v2
- # id: mix-cache # id to use in retrieve action
- # with:
- # path: deps
- # key: ${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-mix-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }}
- # - name: Retrieve Mix Dependencies Compilation Cache
- # uses: actions/cache@v2
- # id: mix-deps-compile-cache # id to use in retrieve action
- # with:
- # path: _build
- # key: ${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-mix-deps-compile-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }}
- # - name: Docker ps
- # run: docker ps
- # - name: Run Tests
- # run: mix test --include server_0_p_10_and_later
- # test-server_0_p_10_p_1:
- # name: runner / Test server_0_p_10_p_1
- # needs: [setup]
- # runs-on: ubuntu-latest
- # env:
- # MIX_ENV: test
- # strategy:
- # matrix:
- # include:
- # - elixir: 1.10.2
- # erlang: 22.3
- # steps:
- # - uses: actions/checkout@v2
- # - name: Docker-compose up
- # run: ./scripts/docker_up.sh
- # - name: Setup elixir
- # uses: actions/setup-elixir@v1
- # with:
- # elixir-version: ${{matrix.elixir}} # Define the elixir version [required]
- # otp-version: ${{matrix.erlang}} # Define the OTP version [required]
- # - name: Retrieve Mix Dependencies Cache
- # uses: actions/cache@v2
- # id: mix-cache # id to use in retrieve action
- # with:
- # path: deps
- # key: ${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-mix-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }}
- # - name: Retrieve Mix Dependencies Compilation Cache
- # uses: actions/cache@v2
- # id: mix-deps-compile-cache # id to use in retrieve action
- # with:
- # path: _build
- # key: ${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-mix-deps-compile-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }}
- # - name: Docker ps
- # run: docker ps
- # - name: Run Tests
- # run: mix test --include server_0_p_10_p_1
- # test-server_0_p_9_p_0:
- # name: runner / Test server_0_p_9_p_0
- # needs: [setup]
- # runs-on: ubuntu-latest
- # env:
- # MIX_ENV: test
- # strategy:
- # matrix:
- # include:
- # - elixir: 1.10.2
- # erlang: 22.3
- # steps:
- # - uses: actions/checkout@v2
- # - name: Docker-compose up
- # run: ./scripts/docker_up.sh
- # - name: Setup elixir
- # uses: actions/setup-elixir@v1
- # with:
- # elixir-version: ${{matrix.elixir}} # Define the elixir version [required]
- # otp-version: ${{matrix.erlang}} # Define the OTP version [required]
- # - name: Retrieve Mix Dependencies Cache
- # uses: actions/cache@v2
- # id: mix-cache # id to use in retrieve action
- # with:
- # path: deps
- # key: ${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-mix-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }}
- # - name: Retrieve Mix Dependencies Compilation Cache
- # uses: actions/cache@v2
- # id: mix-deps-compile-cache # id to use in retrieve action
- # with:
- # path: _build
- # key: ${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-mix-deps-compile-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }}
- # - name: Docker ps
- # run: docker ps
- # - name: Run Tests
- # run: mix test --include server_0_p_9_p_0
- # test-server_0_p_8_p_0:
- # name: runner / Test server_0_p_8_p_0
- # needs: [setup]
- # runs-on: ubuntu-latest
- # env:
- # MIX_ENV: test
- # strategy:
- # matrix:
- # include:
- # - elixir: 1.10.2
- # erlang: 22.3
- # steps:
- # - uses: actions/checkout@v2
- # - name: Docker-compose up
- # run: ./scripts/docker_up.sh
- # - name: Setup elixir
- # uses: actions/setup-elixir@v1
- # with:
- # elixir-version: ${{matrix.elixir}} # Define the elixir version [required]
- # otp-version: ${{matrix.erlang}} # Define the OTP version [required]
- # - name: Retrieve Mix Dependencies Cache
- # uses: actions/cache@v2
- # id: mix-cache # id to use in retrieve action
- # with:
- # path: deps
- # key: ${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-mix-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }}
- # - name: Retrieve Mix Dependencies Compilation Cache
- # uses: actions/cache@v2
- # id: mix-deps-compile-cache # id to use in retrieve action
- # with:
- # path: _build
- # key: ${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-mix-deps-compile-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }}
- # - name: Docker ps
- # run: docker ps
- # - name: Run Tests
- # run: mix test --include server_0_p_8_p_0
- # test-new_client:
- # name: runner / Test new_client
- # needs: [setup]
- # runs-on: ubuntu-latest
- # env:
- # MIX_ENV: test
- # strategy:
- # matrix:
- # include:
- # - elixir: 1.10.2
- # erlang: 22.3
- # steps:
- # - uses: actions/checkout@v2
- # - name: Docker-compose up
- # run: ./scripts/docker_up.sh
- # - name: Setup elixir
- # uses: actions/setup-elixir@v1
- # with:
- # elixir-version: ${{matrix.elixir}} # Define the elixir version [required]
- # otp-version: ${{matrix.erlang}} # Define the OTP version [required]
- # - name: Retrieve Mix Dependencies Cache
- # uses: actions/cache@v2
- # id: mix-cache # id to use in retrieve action
- # with:
- # path: deps
- # key: ${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-mix-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }}
- # - name: Retrieve Mix Dependencies Compilation Cache
- # uses: actions/cache@v2
- # id: mix-deps-compile-cache # id to use in retrieve action
- # with:
- # path: _build
- # key: ${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-mix-deps-compile-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }}
- # - name: Docker ps
- # run: docker ps
- # - name: Run Tests
- # run: mix test --include new_client
- # test:
- # name: runner / Test new_client
- # needs: [setup]
- # runs-on: ubuntu-latest
- # env:
- # MIX_ENV: test
- # strategy:
- # matrix:
- # include:
- # - elixir: 1.10.2
- # erlang: 22.3
- # steps:
- # - uses: actions/checkout@v2
- # - name: Docker-compose up
- # run: ./scripts/docker_up.sh
- # - name: Setup elixir
- # uses: actions/setup-elixir@v1
- # with:
- # elixir-version: ${{matrix.elixir}} # Define the elixir version [required]
- # otp-version: ${{matrix.erlang}} # Define the OTP version [required]
- # - name: Retrieve Mix Dependencies Cache
- # uses: actions/cache@v2
- # id: mix-cache # id to use in retrieve action
- # with:
- # path: deps
- # key: ${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-mix-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }}
- # - name: Retrieve Mix Dependencies Compilation Cache
- # uses: actions/cache@v2
- # id: mix-deps-compile-cache # id to use in retrieve action
- # with:
- # path: _build
- # key: ${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-mix-deps-compile-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }}
- # - name: Docker ps
- # run: docker ps
- # - name: Run Tests
- # run: mix test
+ run: ${{ matrix.tests }}

improve naming and specify complete command in matrix