Skip to content

Commit

Permalink
Revert "Revert "Update to Elixir 1.18 (#132)" (#133)" (#134)
Browse files Browse the repository at this point in the history
* update version

* bookworm and otp 27.2

* use 1.18.1

* consolidate docker commands

* clear /tmp of files created by root

* builder and runner
  • Loading branch information
jiegillet authored Jan 10, 2025
1 parent a9559fb commit 41da541
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 19 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/elixir_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
runs-on: ubuntu-20.04

container:
image: hexpm/elixir:1.17.0-erlang-27.0-debian-bookworm-20240612
image: hexpm/elixir:1.18.1-erlang-27.2-debian-bookworm-20241223

steps:
- name: Install git
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/exercism_test_helper_build_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-22.04

container:
image: hexpm/elixir:1.17.0-erlang-27.0-debian-bookworm-20240612
image: hexpm/elixir:1.18.1-erlang-27.2-debian-bookworm-20241223

steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
Expand Down
4 changes: 2 additions & 2 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
elixir 1.17.0-otp-27
erlang 27.0
elixir 1.18.1-otp-27
erlang 27.2
28 changes: 16 additions & 12 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
FROM hexpm/elixir:1.17.0-erlang-27.0-debian-bookworm-20240612

# Install SSL ca certificates
RUN apt-get update && \
apt-get install bash jo jq -y
FROM hexpm/elixir:1.18.1-erlang-27.2-debian-bookworm-20241223 as builder

Check warning on line 1 in Dockerfile

View workflow job for this annotation

GitHub Actions / build-and-push-image / build-and-push

The 'as' keyword should match the case of the 'from' keyword

FromAsCasing: 'as' and 'FROM' keywords' casing do not match More info: https://docs.docker.com/go/dockerfile/rule/from-as-casing/

Check warning on line 1 in Dockerfile

View workflow job for this annotation

GitHub Actions / build-and-push-image / build-and-push

The 'as' keyword should match the case of the 'from' keyword

FromAsCasing: 'as' and 'FROM' keywords' casing do not match More info: https://docs.docker.com/go/dockerfile/rule/from-as-casing/

Check warning on line 1 in Dockerfile

View workflow job for this annotation

GitHub Actions / build-and-push-image / build-and-push

The 'as' keyword should match the case of the 'from' keyword

FromAsCasing: 'as' and 'FROM' keywords' casing do not match More info: https://docs.docker.com/go/dockerfile/rule/from-as-casing/

# Create appuser
RUN useradd -ms /bin/bash appuser
Expand All @@ -13,15 +9,23 @@ COPY . .

# Compile the formatter
WORKDIR /opt/test-runner/exercism_test_helper
RUN mix local.rebar --force
RUN mix local.hex --force
RUN mix deps.get
RUN MIX_ENV=test mix compile
RUN mix test --no-compile
RUN mix local.rebar --force && \
mix local.hex --force && \
mix deps.get && \
MIX_ENV=test mix compile && \
mix test --no-compile

# Build the escript
RUN MIX_ENV=prod mix escript.build
RUN mv exercism_test_helper /opt/test-runner/bin
RUN MIX_ENV=prod mix escript.build && \
mv exercism_test_helper /opt/test-runner/bin

FROM hexpm/elixir:1.18.1-erlang-27.2-debian-bookworm-20241223 as runner

Check warning on line 22 in Dockerfile

View workflow job for this annotation

GitHub Actions / build-and-push-image / build-and-push

The 'as' keyword should match the case of the 'from' keyword

FromAsCasing: 'as' and 'FROM' keywords' casing do not match More info: https://docs.docker.com/go/dockerfile/rule/from-as-casing/

Check warning on line 22 in Dockerfile

View workflow job for this annotation

GitHub Actions / build-and-push-image / build-and-push

The 'as' keyword should match the case of the 'from' keyword

FromAsCasing: 'as' and 'FROM' keywords' casing do not match More info: https://docs.docker.com/go/dockerfile/rule/from-as-casing/

Check warning on line 22 in Dockerfile

View workflow job for this annotation

GitHub Actions / build-and-push-image / build-and-push

The 'as' keyword should match the case of the 'from' keyword

FromAsCasing: 'as' and 'FROM' keywords' casing do not match More info: https://docs.docker.com/go/dockerfile/rule/from-as-casing/
COPY --from=builder /etc/passwd /etc/passwd
COPY --from=builder /opt/test-runner /opt/test-runner

# Install SSL ca certificates
RUN apt-get update && \
apt-get install bash jo jq -y

USER appuser

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Exercism Automated Test Runner for Elixir Exercises

## Environment

The test runner currently targets exercises supporting Elixir >= 1.12 and Erlang/OTP >= 24, but is running on Elixir 1.17.0 on hexpm's `elixir:1.17.0-erlang-27.0-debian-bookworm-20240612` image.
The test runner currently targets exercises supporting Elixir >= 1.14 and Erlang/OTP >= 25, but is running on Elixir 1.18.0 on hexpm's `elixir:1.18.1-erlang-27.2-debian-bookworm-20241223` image.

The `Dockerfile` also has added `bash`, `jo` and `jq` to the image.

Expand Down
2 changes: 1 addition & 1 deletion elixir
Submodule elixir updated 210 files
2 changes: 1 addition & 1 deletion exercism_test_helper/mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ defmodule ExercismTestHelper.MixProject do
[
app: :exercism_test_helper,
version: "0.1.2",
elixir: "~> 1.17",
elixir: "~> 1.18",
start_permanent: Mix.env() == :prod,
deps: deps(),
escript: escript()
Expand Down

0 comments on commit 41da541

Please sign in to comment.