Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/elixir.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ concurrency:
cancel-in-progress: true

env:
CACHE_VERSION: v8
CACHE_VERSION: v10
PERSISTENT_CACHE_DIR: cached

jobs:
Expand Down
4 changes: 2 additions & 2 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
erlang 27.0
elixir 1.17.1-otp-27
erlang 27.2.1
elixir 1.17.3-otp-27
nodejs 21.7.3
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# platform specific, it makes sense to build it in the docker

#### Builder
FROM hexpm/elixir:1.17.1-erlang-27.0-alpine-3.20.1 AS buildcontainer
FROM hexpm/elixir:1.17.3-erlang-27.2.1-alpine-3.20.5 AS buildcontainer

ARG MIX_ENV=ce

Expand Down Expand Up @@ -54,7 +54,7 @@ COPY rel rel
RUN mix release plausible

# Main Docker Image
FROM alpine:3.20.1
FROM alpine:3.20.5
LABEL maintainer="plausible.io <[email protected]>"

ARG BUILD_METADATA={}
Expand Down
10 changes: 7 additions & 3 deletions test/plausible/exports_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,9 @@ defmodule Plausible.ExportsTest do
end)

assert {:ok, files} =
:zip.unzip(to_charlist(Path.join(tmp_dir, "numbers.zip")), cwd: tmp_dir)
:zip.unzip(to_charlist(Path.join(tmp_dir, "numbers.zip")),
cwd: to_charlist(tmp_dir)
)

assert Enum.map(files, &Path.basename/1) == ["1.csv", "2.csv"]

Expand Down Expand Up @@ -137,8 +139,10 @@ defmodule Plausible.ExportsTest do
end)
end

assert {:error, :einval} =
:zip.unzip(to_charlist(Path.join(tmp_dir, "failed.zip")), cwd: tmp_dir)
assert {:error, :bad_eocd} =
:zip.unzip(to_charlist(Path.join(tmp_dir, "failed.zip")),
cwd: to_charlist(tmp_dir)
)
end
end
end
8 changes: 5 additions & 3 deletions test/plausible/imported/csv_importer_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -1228,17 +1228,19 @@ defmodule Plausible.Imported.CSVImporterTest do
)
)
else
File.rename!(context.local_path, Path.join(tmp_dir, "plausible-export.zip"))
Plausible.File.mv!(context.local_path, Path.join(tmp_dir, "plausible-export.zip"))
end

context
end

defp unzip_archive(%{tmp_dir: tmp_dir} = context) do
assert {:ok, files} =
:zip.unzip(to_charlist(Path.join(tmp_dir, "plausible-export.zip")), cwd: tmp_dir)
:zip.unzip(to_charlist(Path.join(tmp_dir, "plausible-export.zip")),
cwd: to_charlist(tmp_dir)
)

Map.put(context, :exported_files, files)
Map.put(context, :exported_files, Enum.map(files, &to_string/1))
end

defp upload_csvs(%{exported_files: files} = context) do
Expand Down
Loading