diff --git a/.github/workflows/lint_and_test.yml b/.github/workflows/lint_and_test.yml index e87cabe..6a49882 100644 --- a/.github/workflows/lint_and_test.yml +++ b/.github/workflows/lint_and_test.yml @@ -37,7 +37,7 @@ jobs: cache-from: type=gha cache-to: type=gha,mode=max - - name: Build and Run Docker image + - name: Run Docker image run: docker compose up --detach # NOTE: All exec commands use the -T flag to compensate for @@ -56,6 +56,3 @@ jobs: - name: Run code checks run: docker compose exec -T phx mix check --no-fix --no-retry - - - name: Shut down Docker containers - run: docker compose down diff --git a/docker-compose.ci.yml b/docker-compose.ci.yml index 2559077..bf26c4b 100644 --- a/docker-compose.ci.yml +++ b/docker-compose.ci.yml @@ -7,6 +7,7 @@ services: - MIX_ENV=test volumes: - '.:/app' + # These lines ensure the deps can be saved as build artifacts for caching - '/app/deps' - '/app/_build' ports: diff --git a/docker/dev.Dockerfile b/docker/dev.Dockerfile index 4de26cb..8c1c1c3 100644 --- a/docker/dev.Dockerfile +++ b/docker/dev.Dockerfile @@ -45,9 +45,9 @@ RUN export PIPX_HOME=/opt/pipx && \ # Set the locale RUN sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen && locale-gen -ENV LANG en_US.UTF-8 -ENV LANGUAGE en_US:en -ENV LC_ALL en_US.UTF-8 +ENV LANG=en_US.UTF-8 +ENV LANGUAGE=en_US:en +ENV LC_ALL=en_US.UTF-8 # Create app directory and copy the Elixir projects into it. WORKDIR /app @@ -57,7 +57,6 @@ COPY . ./ # RUN mix archive.install github hexpm/hex branch latest RUN MIX_ENV=dev mix deps.get && MIX_ENV=dev mix deps.compile RUN MIX_ENV=test mix deps.get && MIX_ENV=test mix deps.compile -RUN rm -rf deps/*/.fetch # Gives us iex shell history ENV ERL_AFLAGS="-kernel shell_history enabled"