diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8339616..8e8bb7f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -7,10 +7,11 @@ jobs: strategy: matrix: elixir: + - 1.15-25 - 1.15-26 - - 1.15-27 + - 1.16-25 - 1.16-26 - - 1.16-27 + - 1.17-25 - 1.17-26 - 1.17-27 env: @@ -44,8 +45,8 @@ jobs: run: mix credo --strict env: MIX_ENV: test - - name: Run Tests & Coverage Analysis - run: mix coveralls.github --trace + - name: Run Tests + run: mix test --trace env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} build: @@ -54,3 +55,36 @@ jobs: steps: - name: Pass all checks run: echo "Tests passed" + coverage: + runs-on: ubuntu-latest + env: + MIX_ENV: test + steps: + - name: Set Elixir and OTP versions + id: elixir-otp + run: | + echo "elixir=$(sed 's/-.*$//' <<< $version)" >> $GITHUB_OUTPUT + echo "otp=$(sed 's/^.*-//' <<< $version)" >> $GITHUB_OUTPUT + env: + version: "1.17-27" + - uses: actions/checkout@v2 + - uses: erlef/setup-beam@v1 + with: + otp-version: ${{ steps.elixir-otp.outputs.otp }} + elixir-version: ${{ steps.elixir-otp.outputs.elixir }} + - name: Cache Elixir dependencies + uses: actions/cache@v2 + with: + path: | + deps + _build + key: ${{ runner.os }}-deps-${{ steps.elixir-otp.outputs.elixir }}-${{ steps.elixir-otp.outputs.otp }}-${{ hashFiles('mix.lock') }} + restore-keys: | + ${{ runner.os }}-deps-${{ steps.elixir-otp.outputs.elixir }}-${{ steps.elixir-otp.outputs.otp }}-${{ hashFiles('mix.lock') }} + ${{ runner.os }}-deps-${{ steps.elixir-otp.outputs.elixir }}-${{ steps.elixir-otp.outputs.otp }}- + - name: Install Dependencies + run: mix do deps.get, deps.compile + - name: Run Tests & Coverage Analysis + run: mix coveralls.github --trace + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/lib/edtf.ex b/lib/edtf.ex index 79f11cf..e731d42 100644 --- a/lib/edtf.ex +++ b/lib/edtf.ex @@ -3,7 +3,7 @@ defmodule EDTF do Parse, validate, and humanize EDTF date strings """ - alias EDTF.{Date, Interval, Aggregate} + alias EDTF.{Aggregate, Date, Interval} @doc """ Parse an EDTF date string diff --git a/mix.exs b/mix.exs index 591125a..1a412c0 100644 --- a/mix.exs +++ b/mix.exs @@ -46,7 +46,7 @@ defmodule EDTF.MixProject do # Run "mix help deps" to learn about dependencies. defp deps do [ - {:credo, "~> 1.7", only: [:dev, :text], runtime: false}, + {:credo, "~> 1.7", only: [:dev, :test], runtime: false}, {:ex_doc, "~> 0.34", only: :dev, runtime: false}, {:excoveralls, "~> 0.18", only: [:dev, :test], runtime: false}, {:inflex, "~> 2.1"}