Skip to content

Merge pull request #4 from Maartz/patch-2 #44

Merge pull request #4 from Maartz/patch-2

Merge pull request #4 from Maartz/patch-2 #44

Workflow file for this run

name: CI
on:
push:
pull_request:
release:
types:
- published
jobs:
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
runs-on: ubuntu-latest
strategy:
matrix:
version:
- elixir: 1.15
otp: 26.0
deploy: true
name: OTP ${{matrix.version.otp}} / Elixir ${{matrix.version.elixir}}
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
- run: mix test
env:
POSTGRES_URL: ecto://postgres:postgres@localhost/idempotency_plug_test
- run: MIX_ENV=test mix credo
deploy:
needs: test
runs-on: ubuntu-latest
if: github.event_name == 'release' && github.event.action == 'published'
name: Deploy published release
env:
HEX_API_KEY: ${{secrets.HEX_API_KEY}}
steps:
- uses: actions/checkout@v2
- uses: erlef/setup-beam@v1
with:
otp-version: 25.0
elixir-version: 1.14
- run: mix deps.get
- run: mix hex.publish --yes