Skip to content

refactor: insert funcions receive struct or changeset #21

refactor: insert funcions receive struct or changeset

refactor: insert funcions receive struct or changeset #21

Workflow file for this run

name: main
on:
push:
env:
OTP_VERSION: "27"
ELIXIR_VERSION: "1.17"
jobs:
style:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: erlef/setup-beam@v1
with:
otp-version: ${{ env.OTP_VERSION }}
elixir-version: ${{ env.ELIXIR_VERSION }}
- uses: actions/cache@v3
with:
path: deps
key: deps_${{ runner.os }}_${{ hashFiles('mix.lock') }}
- run: mix do deps.get + deps.compile + compile
- run: mix format --check-formatted
analysis:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: erlef/setup-beam@v1
with:
otp-version: ${{ env.OTP_VERSION }}
elixir-version: ${{ env.ELIXIR_VERSION }}
- uses: actions/cache@v3
with:
path: deps
key: deps_${{ runner.os }}_${{ hashFiles('mix.lock') }}
- run: mix do deps.get + deps.compile + compile
- run: mix dialyzer
test:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:16.1-alpine3.19
ports:
- 5432:5432
env:
POSTGRES_PASSWORD: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v3
- uses: erlef/setup-beam@v1
with:
otp-version: ${{ env.OTP_VERSION }}
elixir-version: ${{ env.ELIXIR_VERSION }}
- uses: actions/cache@v3
with:
path: deps
key: deps_${{ runner.os }}_${{ hashFiles('mix.lock') }}
- run: MIX_ENV=test mix do deps.get + deps.compile + compile
- run: mix test