Skip to content

Adapt to new Hammer API #127

Adapt to new Hammer API

Adapt to new Hammer API #127

Workflow file for this run

name: CI
on:
pull_request:
branches:
- master
push:
branches:
- master
jobs:
test:
runs-on: ubuntu-latest
env:
MIX_ENV: test
services:
redis:
# Docker Hub image
image: redis
ports:
- 6379:6379
# Set health checks to wait until redis has started
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
strategy:
# https://hexdocs.pm/elixir/compatibility-and-deprecations.html#between-elixir-and-erlang-otp
matrix:
elixir: [1.15, 1.16, 1.17]
otp: [25, 26]
include:
- elixir: 1.17
otp: 27
steps:
- uses: actions/checkout@v4
- uses: erlef/setup-beam@v1
with:
otp-version: ${{matrix.otp}}
elixir-version: ${{matrix.elixir}}
- uses: actions/cache@v4
with:
path: |
deps
_build
key: test-otp-${{ matrix.otp }}-elixir-${{ matrix.elixir }}-ref-${{ github.head_ref || github.ref }}-mix-${{ hashFiles('**/mix.lock') }}
restore-keys: |
test-otp-${{ matrix.otp }}-elixir-${{ matrix.elixir }}-ref-${{ github.head_ref || github.ref }}-mix-
test-otp-${{ matrix.otp }}-elixir-${{ matrix.elixir }}-ref-refs/heads/master-mix-
- run: mix deps.get
- run: mix deps.unlock --check-unused
- run: mix deps.compile
- run: mix compile --warnings-as-errors
- run: mix credo --strict --format=oneline
- run: mix test --warnings-as-errors --cover --include redis
format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: erlef/setup-beam@v1
with:
elixir-version: 1
otp-version: 27
- run: mix format --check-formatted