diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..937bd243 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,53 @@ +name: Tests + +on: + push: + pull_request: + branches: + - main + +#env: + # ACTIONS_RUNNER_FORCED_INTERNAL_NODE_VERSION: node16 + # ACTIONS_RUNNER_FORCE_ACTIONS_NODE_VERSION: node16 + # ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true + +jobs: + tests: + name: Run tests (${{ matrix.image }}) + + strategy: + fail-fast: false + matrix: + include: + - image: 1.7.4-erlang-21.3.8.24-debian-stretch-20210902-slim + - image: 1.17.2-erlang-27.0.1-debian-bookworm-20240701-slim + + runs-on: ubuntu-20.04 + container: + image: hexpm/elixir:${{ matrix.image }} + + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Hex and Rebar setup + run: | + mix local.hex --force + mix local.rebar --force + + - name: Restore deps and _build cache + uses: actions/cache@v2 + with: + path: | + deps + _build + key: deps-${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-${{ hashFiles('**/mix.lock') }} + restore-keys: | + deps-${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }} + - name: Install dependencies + run: mix deps.get --only test + + - name: Run tests + run: | + epmd -daemon + mix test diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 2d2e253b..00000000 --- a/.travis.yml +++ /dev/null @@ -1,13 +0,0 @@ -language: elixir -elixir: 1.6.6 -otp_release: 21.3 -matrix: - include: - - elixir: 1.8.2 - otp_release: 21.3 -sudo: false -before_script: - - epmd -daemon - - mix deps.get --only test -script: - - mix test diff --git a/README.md b/README.md index fde300f6..1a297495 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ > Distributed PubSub and Presence platform for the Phoenix Framework -[![Build Status](https://api.travis-ci.org/phoenixframework/phoenix_pubsub.svg)](https://travis-ci.org/phoenixframework/phoenix_pubsub) +[![Build Status](https://github.com/phoenixframework/phoenix_pubsub/workflows/CI/badge.svg)](https://github.com/phoenixframework/phoenix_pubsub/actions?query=workflow%3A%22CI%22) ## Usage diff --git a/test/phoenix/tracker/clock_test.exs b/test/phoenix/tracker/clock_test.exs index 98e761ba..2125352f 100644 --- a/test/phoenix/tracker/clock_test.exs +++ b/test/phoenix/tracker/clock_test.exs @@ -53,6 +53,6 @@ defmodule Phoenix.TrackerClockTest do test "replicas" do assert Clock.replicas(%{}) == [] assert Clock.replicas(%{a: 1}) == [:a] - assert Clock.replicas(%{a: 1, b: 2}) == [:a, :b] + assert Clock.replicas(%{a: 1, b: 2}) |> Enum.sort() == [:a, :b] end end