Split integration test stages up
MODIFY
.github/workflows/test.yml
.github/workflows/test.yml
@@ -6,10 +6,51 @@ on:
pull_request:
branches: [master]
-
jobs:
- test-dockerized:
- name: runner / Test Suite
+ setup:
+ name: runner / setup
+ runs-on: ubuntu-latest
+ env:
+ MIX_ENV: test
+
+ strategy:
+ matrix:
+ include:
+ - elixir: 1.10.2
+ erlang: 22.3
+ steps:
+ - uses: actions/checkout@v2
+ - 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: Install Mix Dependencies
+ if: steps.mix-cache.outputs.cache-hit != 'true'
+ run: |
+ mix local.rebar --force
+ mix local.hex --force
+ mix deps.get
+
+ - name: Compile Mix Dependencies
+ if: steps.mix-deps-compile-cache.outputs.cache-hit != 'true'
+ run: mix deps.compile
+
+ test-integration:
+ name: runner / Test Integration
runs-on: ubuntu-latest
env:
@@ -30,11 +71,310 @@ jobs:
with:
elixir-version: ${{matrix.elixir}} # Define the elixir version [required]
otp-version: ${{matrix.erlang}} # Define the OTP version [required]
- - name: Install Dependencies
- run: mix deps.get
- - name: Build Dependencies
- run: mix deps.compile
+
+ - 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 integration
+
+ test-consumer_group:
+ name: runner / Test consumer_group
+
+ 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 consumer_group
+ test-server_0_p_10_and_later:
+ name: runner / Test server_0_p_10_and_later
+
+ 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
+
+ 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
+
+ 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
+
+ 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
+
+ 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
+
+ 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: ./scripts/ci_tests.sh
\ No newline at end of file
+ run: mix test

Split integration test stages up