diff --git a/.github/workflows/elixir.yml b/.github/workflows/ci.yml similarity index 53% rename from .github/workflows/elixir.yml rename to .github/workflows/ci.yml index dea88d8..ff9d628 100644 --- a/.github/workflows/elixir.yml +++ b/.github/workflows/ci.yml @@ -3,7 +3,7 @@ # separate terms of service, privacy policy, and support # documentation. -name: Elixir CI +name: CI on: push: @@ -15,29 +15,43 @@ permissions: contents: read jobs: - build: + tests: name: build and test runs-on: ubuntu-latest env: MIX_ENV: test GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + strategy: + fail-fast: false + matrix: + include: + - elixir: "1.19.5" + otp: "28.3.1" + - elixir: "1.17.3" + otp: "27.3.4.7" + - elixir: "1.13.4" + otp: "25.3.2.21" + steps: - uses: actions/checkout@v4 - name: Set up Elixir uses: erlef/setup-beam@v1.20.4 with: - otp-version: 28.3.1 - elixir-version: 1.19.5 - - name: Restore dependencies cache + elixir-version: ${{ matrix.elixir }} + otp-version: ${{ matrix.otp }} + - name: Restore deps and _build cache uses: actions/cache@v3 with: - path: deps - key: ${{ runner.os }}-mix-${{ hashFiles('**/mix.lock') }} - restore-keys: ${{ runner.os }}-mix- + path: | + deps + _build + key: ${{ runner.os }}-${{ matrix.elixir }}-${{ matrix.otp }}-${{ hashFiles('**/mix.lock') }} + restore-keys: | + ${{ runner.os }}-${{ matrix.elixir }}-${{ matrix.otp }}- - name: Install dependencies run: mix deps.get - name: Run tests - run: mix coveralls.github + run: make test-code - name: Check code run: make analyze-code diff --git a/Makefile b/Makefile index 5026d4a..43f6791 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,7 @@ .PHONY: test-code test-code: - mix cover.lint + mix coveralls.github .PHONY: analyze-code analyze-code: diff --git a/mix.exs b/mix.exs index 411dd0a..b64a725 100644 --- a/mix.exs +++ b/mix.exs @@ -9,7 +9,7 @@ defmodule ModuleResolver.MixProject do [ app: :module_resolver, version: "0.1.0", - elixir: "~> 1.12", + elixir: "~> 1.13", start_permanent: Mix.env() == :prod, deps: deps(), package: package(), @@ -60,10 +60,7 @@ defmodule ModuleResolver.MixProject do [ preferred_envs: [ cover: :test, - "cover.detail": :test, - "cover.html": :test, - "cover.filter": :test, - "cover.lint": :test, + "coveralls.github": :test, credo: :test, dialyzer: :test ]