diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 440f0b8..efe4a9f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,60 +7,41 @@ on: - master jobs: - mix_test: - name: mix test (Elixir ${{matrix.elixir}} | Erlang/OTP ${{matrix.otp}}) - runs-on: ubuntu-latest + test: + runs-on: ubuntu-16.04 + env: + MIX_ENV: test strategy: fail-fast: false matrix: include: - - elixir: 1.5.3 - otp: 20.3.8.26 - - elixir: 1.6.6 - otp: 20.3.8.26 - - elixir: 1.7.4 - otp: 20.3.8.26 - - elixir: 1.8.2 - otp: 20.3.8.26 - - elixir: 1.9.4 - otp: 20.3.8.26 - - elixir: 1.10.4 - otp: 23.0.3 + - pair: + elixir: 1.5.3 + otp: 19.3.6.13 + - pair: + elixir: 1.11.3 + otp: 23.2.5 + lint: lint steps: - uses: actions/checkout@v2 + - uses: erlef/setup-elixir@v1 with: - otp-version: ${{matrix.otp}} - elixir-version: ${{matrix.elixir}} + otp-version: ${{matrix.pair.otp}} + elixir-version: ${{matrix.pair.elixir}} + - name: Install Dependencies - run: | - mix local.hex --force - mix deps.get --only test - - run: mix test + run: mix deps.get --only test - check_formatted: - name: Check formatted - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: erlef/setup-elixir@v1 - with: - otp-version: 23.0.3 - elixir-version: 1.10.4 - run: mix format --check-formatted + if: ${{ matrix.lint }} - compile_without_warnings: - name: Compile without warnings - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: erlef/setup-elixir@v1 - with: - otp-version: 22.3.4.5 - elixir-version: 1.9.4 # not 1.10 as its --warnigs-as-errors has bugs https://github.com/elixir-lang/elixir/issues/10073 - - name: Install Dependencies - run: | - mix local.hex --force - mix deps.get - - name: Compile without warnings - run: mix compile --warnings-as-errors + - run: mix deps.get && mix deps.unlock --check-unused + if: ${{ matrix.lint }} + + - run: mix deps.compile + + - run: mix compile --warnings-as-errors + if: ${{ matrix.lint }} + + - run: mix test diff --git a/mix.lock b/mix.lock index 95b5c79..347c063 100644 --- a/mix.lock +++ b/mix.lock @@ -1,5 +1,4 @@ %{ - "earmark": {:hex, :earmark, "1.4.3", "364ca2e9710f6bff494117dbbd53880d84bebb692dafc3a78eb50aa3183f2bfd", [:mix], [], "hexpm", "8cf8a291ebf1c7b9539e3cddb19e9cef066c2441b1640f13c34c1d3cfc825fec"}, "earmark_parser": {:hex, :earmark_parser, "1.4.10", "6603d7a603b9c18d3d20db69921527f82ef09990885ed7525003c7fe7dc86c56", [:mix], [], "hexpm", "8e2d5370b732385db2c9b22215c3f59c84ac7dda7ed7e544d7c459496ae519c0"}, "ex_doc": {:hex, :ex_doc, "0.22.6", "0fb1e09a3e8b69af0ae94c8b4e4df36995d8c88d5ec7dbd35617929144b62c00", [:mix], [{:earmark_parser, "~> 1.4.0", [hex: :earmark_parser, repo: "hexpm", optional: false]}, {:makeup_elixir, "~> 0.14", [hex: :makeup_elixir, repo: "hexpm", optional: false]}], "hexpm", "1e0aceda15faf71f1b0983165e6e7313be628a460e22a031e32913b98edbd638"}, "makeup": {:hex, :makeup, "1.0.3", "e339e2f766d12e7260e6672dd4047405963c5ec99661abdc432e6ec67d29ef95", [:mix], [{:nimble_parsec, "~> 0.5", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "2e9b4996d11832947731f7608fed7ad2f9443011b3b479ae288011265cdd3dad"},