Skip to content

Improve Tests and Log CMC Errors #121

Improve Tests and Log CMC Errors

Improve Tests and Log CMC Errors #121

Workflow file for this run

name: Elixir CI
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
env:
MIX_ENV: test
permissions:
contents: read
jobs:
build:
name: Build and test
runs-on: ubuntu-22.04
services:
postgres:
image: postgres:latest
env:
POSTGRES_DB: prodigytest
POSTGRES_PASSWORD: prodigytest
POSTGRES_USER: prodigytest
ports:
- 5432:5432
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: '1.13.4' # Define the elixir version [required]
otp-version: '25' # Define the OTP version [required]
- name: Restore dependencies cache
uses: actions/cache@v3
with:
path: deps
key: ${{ runner.os }}-mix-${{ hashFiles('**/mix.lock') }}
restore-keys: ${{ runner.os }}-mix-
- name: Restore build cache
uses: actions/cache@v3
with:
path: _build
key: ${{ runner.os }}-build-${{ hashFiles('**/mix.lock') }}
restore-keys: ${{ runner.os }}-mix-
- name: Install dependencies
run: mix deps.get
- name: Compile
run: mix compile
- name: Run Migrations
run: mix ecto.migrate
- name: Run tests
run: mix test