Skip to content

Commit

Permalink
Fixing repo migrations
Browse files Browse the repository at this point in the history
  • Loading branch information
naps62 committed Jun 25, 2020
1 parent 5a0efe5 commit bc132e3
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 6 deletions.
23 changes: 21 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
push:
branches:
- master
- mp/test
tags:
- "*"
pull_request:
Expand Down Expand Up @@ -34,9 +35,27 @@ jobs:

steps:
- uses: actions/checkout@v2

- name: Setup Deps Cache
uses: actions/cache@v1
with:
path: deps
key: v1-deps-${{ runner.os }}-mix-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }}
restore-keys: |
v1-deps-${{ runner.os }}-
- name: Setup Build Cache
uses: actions/cache@v1
with:
path: _build
key: v1-build-${{ runner.os }}-mix-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }}
restore-keys: |
v1-build-${{ runner.os }}-
- run: mix local.hex --force
- run: mix local.rebar --force
- run: mix deps.get
- run: mix ecto.create
- run: mix ecto.migrate
- run: mix deps.compile
- run: mix compile
- run: MIX_ENV=test mix ecto.migrate
- run: mix test
2 changes: 1 addition & 1 deletion config/test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use Mix.Config

config :fsmx, ecto_repos: [Fsmx.Repo]

config :postgrex, Fsmx.Repo,
config :fsmx, Fsmx.Repo,
adapter: Ecto.Adapters.Postgres,
username: System.get_env("POSTGRES_USER") || "postgres",
password: System.get_env("POSTGRES_PASS") || "postgres",
Expand Down
5 changes: 2 additions & 3 deletions test/support/repo.ex
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
defmodule Fsmx.Repo do
use Ecto.Repo,
otp_app: :postgrex,
adapter: Ecto.Adapters.Postgres,
priv: "test/support/repo/migrations"
otp_app: :fsmx,
adapter: Ecto.Adapters.Postgres
end

0 comments on commit bc132e3

Please sign in to comment.