Skip to content

Merge pull request #7 from ShawnMcCool/main #55

Merge pull request #7 from ShawnMcCool/main

Merge pull request #7 from ShawnMcCool/main #55

Workflow file for this run

name: CI
on:
push:
branches: [ main ]
pull_request:
workflow_call:
jobs:
lint:
runs-on: ubuntu-latest
name: Linter
env:
MIX_ENV: test
steps:
- uses: actions/checkout@v3
- uses: erlef/setup-beam@v1
with:
otp-version: 26.0
elixir-version: 1.16
- run: mix deps.get
- run: mix compile --warnings-as-errors
- run: mix credo --strict --ignore design.alias
- run: mix format --check-formatted
test:
services:
postgres:
image: postgres:latest
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: idempotency_plug_test
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
strategy:
matrix:
version:
- otp: 26.0
elixir: 1.16
- otp: 26.0
elixir: 1.14
runs-on: ubuntu-latest
name: OTP ${{matrix.version.otp}} / Elixir ${{matrix.version.elixir}}
env:
MIX_ENV: test
POSTGRES_URL: ecto://postgres:postgres@localhost/idempotency_plug_test
steps:
- uses: actions/checkout@v2
- uses: erlef/setup-beam@v1
with:
otp-version: ${{matrix.version.otp}}
elixir-version: ${{matrix.version.elixir}}
- run: mix deps.get mix compile --warnings-as-errors
- run: mix test