Merge pull request #190 from lucacorti/dependabot/hex/dialyxir-1.4.5 #444
This file contains 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: Continuous Integration | |
on: | |
pull_request: | |
types: [opened, reopened, synchronize] | |
push: | |
branches: | |
- "master" | |
jobs: | |
test: | |
env: | |
MIX_ENV: test | |
runs-on: ubuntu-20.04 | |
name: Test (OTP ${{ matrix.otp }} / Elixir ${{ matrix.elixir }}) | |
services: | |
rabbitmq: | |
image: rabbitmq:3 | |
ports: | |
- 5672:5672 | |
options: --health-cmd "rabbitmqctl node_health_check" --health-interval 10s --health-timeout 5s --health-retries 5 | |
strategy: | |
matrix: | |
# For details see: https://hexdocs.pm/elixir/compatibility-and-deprecations.html#compatibility-between-elixir-and-erlang-otp | |
elixir: ["1.17", "1.16", "1.15", "1.14"] | |
otp: ["27", "26"] | |
exclude: | |
- { otp: "27", elixir: "1.16" } | |
- { otp: "27", elixir: "1.15" } | |
- { otp: "27", elixir: "1.14" } | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: erlef/setup-beam@v1 | |
with: | |
otp-version: ${{ matrix.otp }} | |
elixir-version: ${{ matrix.elixir }} | |
- run: mix deps.get | |
- run: mix test | |
lint: | |
runs-on: ubuntu-latest | |
name: Linting | |
strategy: | |
matrix: | |
elixir: ["1.17"] | |
otp: ["27"] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: erlef/setup-beam@v1 | |
with: | |
otp-version: ${{ matrix.otp }} | |
elixir-version: ${{ matrix.elixir }} | |
id: beam | |
- name: PLT cache | |
uses: actions/cache@v4 | |
with: | |
key: | | |
${{ runner.os }}-${{ steps.beam.outputs.elixir-version }}-${{ steps.beam.outputs.otp-version }}-plt | |
restore-keys: | | |
${{ runner.os }}-${{ steps.beam.outputs.elixir-version }}-${{ steps.beam.outputs.otp-version }}-plt | |
path: | | |
priv/plts | |
- run: mix deps.get | |
- run: mix deps.unlock --check-unused | |
- run: mix compile --warnings-as-errors | |
- run: mix format --check-formatted | |
- run: mix credo --strict --all | |
- run: mix dialyzer --halt-exit-status |