build(make): build deps when running tests #178
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: build | |
on: [push, pull_request] | |
env: | |
SERVER_FOLDER: rabbitmq-server | |
PLUGIN_FOLDER: rabbitmq-server/deps/rabbitmq-message-deduplication | |
jobs: | |
build: | |
runs-on: ubuntu-24.04 | |
strategy: | |
matrix: | |
PLATFORM: | |
- { RMQREF: "v3.13.x", ERLVER: "26.2", ELXVER: "1.16" } | |
- { RMQREF: "v4.0.x", ERLVER: "26.2", ELXVER: "1.16" } | |
- { RMQREF: "v4.1.x", ERLVER: "27", ELXVER: "1.18" } | |
name: "Broker: ${{ matrix.PLATFORM.RMQREF }} - Erlang: ${{ matrix.PLATFORM.ERLVER }} - Elixir: ${{ matrix.PLATFORM.ELXVER }}" | |
steps: | |
- name: Checkout RabbitMQ Server | |
uses: actions/checkout@v4 | |
with: | |
repository: rabbitmq/rabbitmq-server | |
path: ${{ env.SERVER_FOLDER }} | |
- name: Checkout Plugin | |
uses: actions/checkout@v4 | |
with: | |
path: ${{ env.PLUGIN_FOLDER }} | |
- name: Install Erlang and Elixir | |
uses: erlef/setup-beam@v1 | |
with: | |
otp-version: ${{ matrix.PLATFORM.ERLVER }} | |
elixir-version: ${{ matrix.PLATFORM.ELXVER }} | |
- name: Run tests | |
working-directory: ${{ env.PLUGIN_FOLDER }} | |
run: | | |
make tests RABBITMQ_VERSION=${{ matrix.PLATFORM.RMQREF }} MIX_ENV=test | |
- name: Build distribution files | |
working-directory: ${{ env.PLUGIN_FOLDER }} | |
run: | | |
make dist RABBITMQ_VERSION=${{ matrix.PLATFORM.RMQREF }} MIX_ENV=prod DIST_AS_EZS=yes | |
- name: Store test artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: tests-rmq${{ matrix.PLATFORM.RMQREF }}-erl${{ matrix.PLATFORM.ERLVER }}-elx${{ matrix.PLATFORM.ELXVER }} | |
path: ${{ env.SERVER_FOLDER }}/logs/ | |
- name: Store build artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: plugins-rmq${{ matrix.PLATFORM.RMQREF }}-erl${{ matrix.PLATFORM.ERLVER }}-elx${{ matrix.PLATFORM.ELXVER }} | |
path: ${{ env.PLUGIN_FOLDER }}/plugins/ |