Skip to content

Commit

Permalink
Adds an automated mix test GitHub workflow.
Browse files Browse the repository at this point in the history
  • Loading branch information
wintermeyer committed Jan 16, 2024
1 parent 4056cd1 commit d4e258d
Showing 1 changed file with 54 additions and 0 deletions.
54 changes: 54 additions & 0 deletions .github/workflows/elixir.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Elixir CI

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
build:
runs-on: ubuntu-latest
services:
db:
image: postgres:13
env:
POSTGRES_PASSWORD: postgres
POSTGRES_DB: animina_test
ports: ['5432:5432']
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v2
- name: Set up Elixir and Erlang
uses: erlef/setup-beam@v1
with:
otp-version: auto
elixir-version: auto
fetch-deps: true
install-hex: true
install-rebar: true
- name: Install Dependencies
run: mix deps.get
- name: Create and Migrate Database
env:
MIX_ENV: test
PGHOST: localhost
PGUSER: postgres
PGPASSWORD: postgres
PGDATABASE: animina_test
run: |
mix ecto.create
mix ecto.migrate
- name: Run Tests
env:
MIX_ENV: test
PGHOST: localhost
PGUSER: postgres
PGPASSWORD: postgres
PGDATABASE: animina_test
run: mix test

0 comments on commit d4e258d

Please sign in to comment.