Skip to content

Commit

Permalink
Try to improvevv the image
Browse files Browse the repository at this point in the history
  • Loading branch information
michalwarda committed Feb 17, 2024
1 parent eef29b3 commit 436a28a
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 3 deletions.
27 changes: 26 additions & 1 deletion .github/workflows/api-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,38 @@ jobs:
POSTGRES_PASSWORD: postgres

steps:
- uses: actions/checkout@v4
- uses: erlef/setup-beam@v1
with:
otp-version: '26'
elixir-version: '1.16.1'
- uses: actions/checkout@v4
- name: Cache deps
id: cache-deps
uses: actions/cache@v3
env:
cache-name: cache-elixir-deps
with:
path: deps
key: ${{ runner.os }}-mix-${{ env.cache-name }}-${{ hashFiles('**/mix.lock') }}
restore-keys: |
${{ runner.os }}-mix-${{ env.cache-name }}-
- name: Cache compiled build
id: cache-build
uses: actions/cache@v3
env:
cache-name: cache-compiled-build
with:
path: _build
key: ${{ runner.os }}-mix-${{ env.cache-name }}-${{ hashFiles('**/mix.lock') }}
restore-keys: |
${{ runner.os }}-mix-${{ env.cache-name }}-
${{ runner.os }}-mix-
- run: mix deps.get
- name: Compiles without warnings
run: mix compile
- run: mix test
env:
POSTGRES_HOST: postgres
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_PORT: 5432
4 changes: 2 additions & 2 deletions apps/api/config/test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ config :bcrypt_elixir, :log_rounds, 1
# to provide built-in test partitioning in CI environment.
# Run `mix help test` for more information.
config :buildel, Buildel.Repo,
username: "postgres",
password: "postgres",
username: System.get_env("POSTGRES_USER", "postgres"),
password: System.get_env("POSTGRES_PASSWORD", "postgres"),
hostname: System.get_env("POSTGRES_HOST", "localhost"),
database: "buildel_test#{System.get_env("MIX_TEST_PARTITION")}",
port: System.get_env("POSTGRES_PORT", "54321"),
Expand Down

0 comments on commit 436a28a

Please sign in to comment.