Skip to content

Commit

Permalink
leave 16 for now
Browse files Browse the repository at this point in the history
  • Loading branch information
greg-rychlewski committed May 2, 2024
1 parent 204afad commit 0828edd
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:
elixirbase:
- "1.11.4-erlang-21.3.8.24-alpine-3.13.3"
postgres:
- "16.0"
- "15.0"
- "11.11"
- "9.6"
- "9.5"
Expand Down
14 changes: 11 additions & 3 deletions Earthfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
VERSION 0.6

all:
ARG ELIXIR_BASE=1.15.7-erlang-25.3.2.11-alpine-3.19.1
ARG ELIXIR_BASE=1.15.6-erlang-25.3.2.6-alpine-3.18.4
BUILD \
--build-arg POSTGRES=16.0 \
--build-arg POSTGRES=11.11 \
Expand All @@ -20,7 +20,7 @@ all:
+integration-test-mssql

setup-base:
ARG ELIXIR_BASE=1.15.7-erlang-25.3.2.11-alpine-3.19.1
ARG ELIXIR_BASE=1.15.6-erlang-25.3.2.6-alpine-3.18.4
FROM hexpm/elixir:$ELIXIR_BASE
RUN apk add --no-progress --update git build-base
ENV ELIXIR_ASSERT_TIMEOUT=10000
Expand All @@ -46,6 +46,14 @@ integration-test-postgres:
# and in the 3.4 version, it is not included in postgresql-client but rather in postgresql
RUN echo 'http://dl-cdn.alpinelinux.org/alpine/v3.4/main' >> /etc/apk/repositories
RUN apk add postgresql=9.5.13-r0
ELSE IF [ "$POSTGRES" = "15.0" ]
# for 15.0 we need an upgraded version of pg_dump;
# alpine 3.17 does not come with the postgres 15 client by default;
# we must first update the public keys for the packages because they
# might have been rotated since our image was built
RUN apk add -X https://dl-cdn.alpinelinux.org/alpine/v3.17/main -u alpine-keys
RUN echo 'http://dl-cdn.alpinelinux.org/alpine/v3.17/main' >> /etc/apk/repositories
RUN apk add postgresql15-client
ELSE
RUN apk add postgresql-client
END
Expand All @@ -59,7 +67,7 @@ integration-test-postgres:
timeout=$(expr $(date +%s) + 30); \
docker run --name pg --network=host -d -e POSTGRES_USER=postgres -e POSTGRES_PASSWORD=postgres -e POSTGRES_DB=postgres "postgres:$POSTGRES"; \
# wait for postgres to start
while ! pg_isready --host=127.0.0.1 --port=5432; do \
while ! pg_isready --host=127.0.0.1 --port=5432 --quiet; do \
test "$(date +%s)" -le "$timeout" || (echo "timed out waiting for postgres"; exit 1); \
echo "waiting for postgres"; \
sleep 1; \
Expand Down

0 comments on commit 0828edd

Please sign in to comment.