From f68b6550eff063fd6f5890a61eae5ce258c877d7 Mon Sep 17 00:00:00 2001 From: Andrew Timberlake Date: Wed, 8 Jun 2022 09:01:18 +0200 Subject: [PATCH] Swtich to Github actions --- .github/workflows/elixir.yml | 63 ++++++++++++++++++++++++++++++++++++ .travis.yml | 19 ----------- mix.exs | 1 - 3 files changed, 63 insertions(+), 20 deletions(-) create mode 100644 .github/workflows/elixir.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/elixir.yml b/.github/workflows/elixir.yml new file mode 100644 index 0000000..1efb21f --- /dev/null +++ b/.github/workflows/elixir.yml @@ -0,0 +1,63 @@ +name: Elixir CI + +on: + push: + branches: [master] + pull_request: + branches: [master] + +env: + MIX_ENV: test + +jobs: + build: + name: Build and test + runs-on: ubuntu-latest + + strategy: + matrix: + elixir: [1.9.4, 1.10.4, 1.11.4, 1.12.3, 1.13.0] + erlang: [20.3, 21.3, 22.3, 23.3, 24.1] + exclude: + - elixir: 1.9.4 + erlang: 23.3 + - elixir: 1.9.4 + erlang: 24.1 + - elixir: 1.10.4 + erlang: 20.3 + - elixir: 1.10.4 + erlang: 23.3 + - elixir: 1.10.4 + erlang: 24.1 + - elixir: 1.11.4 + erlang: 20.3 + - elixir: 1.11.4 + erlang: 24.1 + - elixir: 1.12.3 + erlang: 20.3 + - elixir: 1.12.3 + erlang: 21.3 + - elixir: 1.13.0 + erlang: 20.3 + - elixir: 1.13.0 + erlang: 21.3 + + steps: + - name: Install image packages + run: sudo apt-get install -y imagemagick ghostscript + - uses: actions/checkout@v2 + - name: Set up Elixir + uses: erlef/setup-beam@988e02bfe678367a02564f65ca2e37726dc0268f + with: + elixir-version: ${{ matrix.elixir }} + otp-version: ${{ matrix.erlang }} + - name: Restore dependencies cache + uses: actions/cache@v2 + with: + path: deps + key: ${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-mix-${{ hashFiles('**/mix.lock') }} + restore-keys: ${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-mix- + - name: Install dependencies + run: mix deps.get + - name: Run tests + run: mix test diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index dcc7991..0000000 --- a/.travis.yml +++ /dev/null @@ -1,19 +0,0 @@ -language: elixir -addons: - apt: - packages: - - imagemagick - - ghostscript -matrix: - include: - - elixir: 1.9.0 - otp_release: 22.0 - - elixir: 1.10.0 - otp_release: 22.0 - - elixir: 1.10.4 - otp_release: 23.0 - - elixir: 1.11.3 - otp_release: 23.0 -notifications: - recipients: - - andrew@andrewtimberlake.com diff --git a/mix.exs b/mix.exs index a949cba..a918876 100644 --- a/mix.exs +++ b/mix.exs @@ -51,7 +51,6 @@ defmodule Trunk.Mixfile do {:ex_doc, ">= 0.0.0", only: :dev, runtime: false}, {:ex_aws_s3, "~> 2.0", optional: true}, {:hackney, ">= 1.7.0", optional: true}, - {:poison, ">= 3.1.0", optional: true}, {:jason, ">= 1.0.0", optional: true}, {:sweet_xml, "~> 0.6", optional: true}, {:bypass, "~> 2.0", only: :test},