Skip to content

applying new behaviour to api #5

applying new behaviour to api

applying new behaviour to api #5

Workflow file for this run

name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
test:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:17
ports:
- 5432:5432
env:
POSTGRES_DB: ppr_api_test
options: >-
--health-cmd "pg_isready"
--health-interval 10s
--health-timeout 5s
--health-retries 5
strategy:
matrix:
elixir: [1.18]
otp: [27.2]
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Elixir
uses: erlef/setup-beam@v1
with:
elixir-version: ${{ matrix.elixir }}
otp-version: ${{ matrix.otp }}
- name: Install dependencies
run: mix deps.get
- name: Set up the database
run: |
mix ecto.create
mix ecto.migrate
env:
MIX_ENV: test
DATABASE_URL: ecto://postgres:postgres@localhost/ppr_api_test
- name: Run tests
run: mix test
env:
MIX_ENV: test