Skip to content

refactor: Allow usage with amqp 4.x (#135) #164

refactor: Allow usage with amqp 4.x (#135)

refactor: Allow usage with amqp 4.x (#135) #164

Workflow file for this run

name: CI
on:
pull_request:
push:
branches:
- main
jobs:
test:
runs-on: ubuntu-20.04
env:
MIX_ENV: test
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
strategy:
fail-fast: false
matrix:
include:
- pair:
elixir: "1.8.2"
otp: "21.3.8.17"
- pair:
elixir: "1.15.0"
otp: "25.3"
lint: lint
coverage: coverage
steps:
- name: Clone the repository
uses: actions/checkout@v3
- name: Start Docker
run: docker-compose up --detach
- name: Install Erlang/OTP and Elixir
uses: erlef/setup-beam@v1
with:
otp-version: ${{ matrix.pair.otp }}
elixir-version: ${{ matrix.pair.elixir }}
- name: Cache Mix dependencies
uses: actions/cache@v3
with:
path: |
deps
_build
key: |
${{ runner.os }}-mix-${{ matrix.pair.elixir }}-${{ matrix.pair.otp }}-${{ hashFiles('**/mix.lock') }}
restore-keys: |
${{ runner.os }}-mix-${{ matrix.pair.elixir }}-${{ matrix.pair.otp }}-
- name: Fetch Mix dependencies
run: mix deps.get
- name: Run the formatter
run: mix format --check-formatted
if: ${{ matrix.lint }}
- name: Check for unused dependencies
run: mix deps.unlock --check-unused
if: ${{ matrix.lint }}
- name: Compile Mix dependencies
run: mix deps.compile
- name: Compile code and check for warnings
run: mix compile --warnings-as-errors
if: ${{ matrix.lint }}
- name: Run tests
run: mix test
if: ${{ !matrix.coverage }}
- name: Run tests with coverage
run: mix coveralls.github
if: ${{ matrix.coverage }}