Skip to content

Elixir Build Job

Elixir Build Job #25

name: Elixir Build Job
on:
workflow_call:
merge_group:
permissions:
contents: read
env:
MIX_ENV: test
jobs:
elixir-build:
name: "Build and test (OTP: ${{matrix.otp}}, elixir: ${{matrix.elixir}})"
strategy:
matrix:
otp: ['24.0', '24.3', '25.1']
elixir: ['1.14.2', '1.14.0']
runs-on: ubuntu-latest
services:
db:
image: postgres:9
ports: ['5432:5432']
env:
POSTGRES_PASSWORD: fleet_yards_dev
POSTGRES_USER: fleet_yards_dev
POSTGRES_DB: fleet_yards_dev
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v3
- name: Set up Elixir
uses: erlef/setup-beam@v1
with:
elixir-version: ${{matrix.elixir}}
otp-version: ${{matrix.otp}}
- name: Restore dependencies cache
uses: actions/cache@v3
with:
path: deps
key: ${{ runner.os }}-mix-${{ hashFiles('**/mix.lock') }}
restore-keys: ${{ runner.os }}-mix-
- name: Install dependencies
run: mix deps.get
- name: Run tests
run: mix test
- name: Check Format
run: mix fmt --check-formatted