Skip to content

first commit

first commit #1

name: CI
on:
push:
branches:
- "*"
pull_request:
branches:
- "*"
jobs:
test:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:15
ports:
- 5432:5432
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: expense_pilot_test
options: >-
--health-cmd "pg_isready -U postgres" --health-interval 10s --health-timeout 5s --health-retries 5
env:
MIX_ENV: test
DATABASE_URL: ecto://postgres:postgres@localhost:5432/expense_pilot_test
steps:
- uses: actions/checkout@v4
- uses: erlef/setup-beam@v1
with:
elixir-version: '1.16.1'
otp-version: '26.2.1'
- name: Install dependencies
run: mix deps.get
- name: Setup database and seed
run: mix ecto.create && mix ecto.migrate && mix run priv/repo/seeds.exs
- name: Run tests
run: mix test