Skip to content

Commit

Permalink
Merge pull request #241 from ex-aws/dialyzer
Browse files Browse the repository at this point in the history
Dialyzer
  • Loading branch information
bernardd authored Jan 11, 2024
2 parents 777f708 + 323dd79 commit fa15ed8
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/on-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,16 @@ jobs:
strategy:
matrix:
otp: [23.x, 24.x, 25.x]
elixir: [1.11.x, 1.12.x, 1.13.x, 1.14.x, 1.15.x]
elixir: [1.11.x, 1.12.x, 1.13.x, 1.14.x, 1.15.x, 1.16.x]
exclude:
- otp: 25.x
elixir: 1.11.x
- otp: 25.x
elixir: 1.12.x
- otp: 23.x
elixir: 1.15.x
- otp: 23.x
elixir: 1.16.x
steps:
- uses: actions/checkout@v2
- uses: erlef/setup-beam@v1
Expand All @@ -27,7 +29,7 @@ jobs:
- run: mix deps.get
- run: mix compile
- run: mix format --check-formatted
if: matrix.elixir == '1.15.x' # Only check formatting with the latest version
if: matrix.elixir == '1.16.x' # Only check formatting with the latest version
- run: mix dialyzer
if: matrix.elixir == '1.15.x'
if: matrix.elixir == '1.16.x'
- run: mix test
2 changes: 1 addition & 1 deletion .tool-versions
Original file line number Diff line number Diff line change
@@ -1 +1 @@
elixir 1.15.0
elixir 1.16
8 changes: 6 additions & 2 deletions lib/ex_aws/s3/upload.ex
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,12 @@ defmodule ExAws.S3.Upload do
"""
@spec stream_file(path :: binary) :: File.Stream.t()
@spec stream_file(path :: binary, opts :: [chunk_size: pos_integer]) :: File.Stream.t()
def stream_file(path, opts \\ []) do
File.stream!(path, [], opts[:chunk_size] || 5 * 1024 * 1024)
if Version.compare(System.version(), "1.16.0") in [:gt, :eq] do
def stream_file(path, opts \\ []),
do: File.stream!(path, opts[:chunk_size] || 5 * 1024 * 1024)
else
def stream_file(path, opts \\ []),
do: File.stream!(path, [], opts[:chunk_size] || 5 * 1024 * 1024)
end

@doc """
Expand Down

0 comments on commit fa15ed8

Please sign in to comment.