Skip to content

Commit

Permalink
[CI] Update the configuration and use ex_check
Browse files Browse the repository at this point in the history
  • Loading branch information
ejpcmac committed May 29, 2020
1 parent b13b9cb commit ded24ef
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 9 deletions.
24 changes: 24 additions & 0 deletions .check.exs
@@ -0,0 +1,24 @@
# Check if the version used by the runner is currently the last supported
# version, that is: the version used in the Nix shell on development machines.
last_supported_version? =
System.version()
|> Version.parse!()
|> Version.match?("~> 1.10.0")

[
skipped: false,
tools: [
{:compiler, "mix compile --force --verbose --warnings-as-errors"},
{:ex_unit, "mix test --trace"},

# Run the formatter and ex_doc only for the last supported version. This
# avoids errors in CI when the formatting changes or ex_doc is not
# compatible with an old Elixir version.
{:formatter, last_supported_version?},
{:ex_doc, last_supported_version?},

# Check for unused dependencies in the mix.lock.
{:unused_deps, "mix deps.unlock --check-unused",
enabled: last_supported_version?}
]
]
24 changes: 15 additions & 9 deletions .travis.yml
@@ -1,8 +1,18 @@
language: elixir
elixir:
- 1.7.4
otp_release:
- 21.1
matrix:
include:
- elixir: 1.6
otp_release: 20.3
- elixir: 1.7
otp_release: 22.3
- elixir: 1.8
otp_release: 22.3
- elixir: 1.9
otp_release: 22.3
- elixir: 1.10
otp_release: 22.3
- elixir: 1.10
otp_release: 23.0
env:
- PLT_DIR=$HOME/.plt
before_script:
Expand All @@ -11,11 +21,7 @@ before_script:
- MIX_ENV=test mix deps.compile
- travis_wait mix dialyzer --plt
script:
- mix compile --force --verbose --warnings-as-errors
- mix test --trace
- mix dialyzer --no-compile --no-check
- mix credo
- if [[ "$TRAVIS_ELIXIR_VERSION" == "1.7.4" ]]; then mix format --check-formatted; fi
- mix check
cache:
directories:
- $PLT_DIR
1 change: 1 addition & 0 deletions mix.exs
Expand Up @@ -42,6 +42,7 @@ defmodule TypedStructLegacyReflection.MixProject do
defp deps do
[
# Development dependencies
{:ex_check, "~> 0.11.0", only: :dev, runtime: false},
{:credo, "~> 1.0", only: :dev, runtime: false},
{:dialyxir, "~> 1.0-rc", only: :dev, runtime: false},
{:excoveralls, ">= 0.0.0", only: :test, runtime: false},
Expand Down
1 change: 1 addition & 0 deletions mix.lock
Expand Up @@ -5,6 +5,7 @@
"dialyxir": {:hex, :dialyxir, "1.0.0-rc.7", "6287f8f2cb45df8584317a4be1075b8c9b8a69de8eeb82b4d9e6c761cf2664cd", [:mix], [{:erlex, ">= 0.2.5", [hex: :erlex, repo: "hexpm", optional: false]}], "hexpm", "506294d6c543e4e5282d4852aead19ace8a35bedeb043f9256a06a6336827122"},
"earmark": {:hex, :earmark, "1.4.3", "364ca2e9710f6bff494117dbbd53880d84bebb692dafc3a78eb50aa3183f2bfd", [:mix], [], "hexpm", "8cf8a291ebf1c7b9539e3cddb19e9cef066c2441b1640f13c34c1d3cfc825fec"},
"erlex": {:hex, :erlex, "0.2.5", "e51132f2f472e13d606d808f0574508eeea2030d487fc002b46ad97e738b0510", [:mix], [], "hexpm", "756d3e19b056339af674b715fdd752c5dac468cf9d0e2d1a03abf4574e99fbf8"},
"ex_check": {:hex, :ex_check, "0.11.0", "6d878d9ae30d19168157bcbf346b527825284e14e77a07ec0492b19cf0036479", [:mix], [], "hexpm", "d41894aa6193f089a05e3abb43ca457e289619fcfbbdd7b60d070b7a62b26832"},
"ex_doc": {:hex, :ex_doc, "0.21.3", "857ec876b35a587c5d9148a2512e952e24c24345552259464b98bfbb883c7b42", [:mix], [{:earmark, "~> 1.4", [hex: :earmark, repo: "hexpm", optional: false]}, {:makeup_elixir, "~> 0.14", [hex: :makeup_elixir, repo: "hexpm", optional: false]}], "hexpm", "0db1ee8d1547ab4877c5b5dffc6604ef9454e189928d5ba8967d4a58a801f161"},
"ex_unit_notifier": {:hex, :ex_unit_notifier, "0.1.4", "36a2dcab829f506e01bf17816590680dd1474407926d43e64c1263e627c364b8", [:mix], [], "hexpm", "fddf5054dd5fd2f809e837b749570baa5c9798e11d0163921baec49b7d5762f2"},
"excoveralls": {:hex, :excoveralls, "0.12.2", "a513defac45c59e310ac42fcf2b8ae96f1f85746410f30b1ff2b710a4b6cd44b", [:mix], [{:hackney, "~> 1.0", [hex: :hackney, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm", "151c476331d49b45601ffc45f43cb3a8beb396b02a34e3777fea0ad34ae57d89"},
Expand Down

0 comments on commit ded24ef

Please sign in to comment.