From a10b81221a17d5bed53257073a840e1a278617a2 Mon Sep 17 00:00:00 2001 From: Aaron Date: Thu, 29 Jun 2023 00:26:03 -0700 Subject: [PATCH] Fixes CI Status (#120) * Move CI workflow to Ubuntu 20.04 * Add newest elixir and OTP to matrix * Set oldest OTP + Elixir matrix to match documentation * Update Mix formatting to elixir 1.15+ --- .github/workflows/ci.yml | 9 ++++++--- lib/flow.ex | 4 ++-- lib/flow/window.ex | 2 +- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6b521aa..83e819e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,7 +8,7 @@ on: jobs: test: - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 env: MIX_ENV: test strategy: @@ -17,10 +17,13 @@ jobs: include: - pair: elixir: 1.7.4 - otp: 19.3.6.13 + otp: 22.3.4 - pair: elixir: 1.14.2 - otp: 24.3 + otp: 24.3.4.1 + - pair: + elixir: 1.15.0 + otp: 26.0.1 lint: lint steps: - uses: actions/checkout@v2 diff --git a/lib/flow.ex b/lib/flow.ex index fe047f2..6ab10c9 100644 --- a/lib/flow.ex +++ b/lib/flow.ex @@ -1579,7 +1579,7 @@ defmodule Flow do {"x", 1}] """ - @spec reduce(t, (() -> acc), (term, acc -> acc)) :: t when acc: term() + @spec reduce(t, (-> acc), (term, acc -> acc)) :: t when acc: term() def reduce(flow, acc_fun, reducer_fun) when is_function(reducer_fun, 2) do cond do has_any_reduce?(flow) -> @@ -1627,7 +1627,7 @@ defmodule Flow do [[1], [1, 2], [1, 2, 3], [2, 3, 4], [3, 4, 5]] """ - @spec emit_and_reduce(t, (() -> acc), (term, acc -> {[event], acc})) :: t + @spec emit_and_reduce(t, (-> acc), (term, acc -> {[event], acc})) :: t when acc: term(), event: term() def emit_and_reduce(flow, acc_fun, reducer_fun) when is_function(reducer_fun, 2) do cond do diff --git a/lib/flow/window.ex b/lib/flow/window.ex index dbe2d5f..d10b3d6 100644 --- a/lib/flow/window.ex +++ b/lib/flow/window.ex @@ -441,7 +441,7 @@ defmodule Flow.Window do We recommend looking at the implementation of `trigger_every/2` as an example of a custom trigger. """ - @spec trigger(t, (() -> acc), trigger_fun) :: t + @spec trigger(t, (-> acc), trigger_fun) :: t when trigger_fun: ([event], acc -> trigger_fun_return), trigger_fun_return: cont_tuple | cont_tuple_with_emitted_events | trigger_tuple, cont_tuple: {:cont, acc},