Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 12 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,20 +36,17 @@ jobs:
fail-fast: false
matrix:
include:
- elixir: "1.14.5"
otp: "24.3.4.17"
- elixir: "1.15.8-otp-25"
otp: "25.3.2.13"
- elixir: "1.16.3-otp-26"
otp: "26.2.5.2"
- elixir: "1.17.2-otp-27"
otp: "27.0.1"
- elixir: "1.15"
otp: "24"
- elixir: "1.19"
otp: "28"
lint: lint

runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v6

- name: Set up Elixir
uses: erlef/setup-beam@v1
Expand All @@ -58,7 +55,7 @@ jobs:
otp-version: ${{ matrix.otp }}

- name: Restore deps and _build cache
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: |
deps
Expand All @@ -72,7 +69,7 @@ jobs:
run: mkdir -p priv/plts

- name: Restore plts cache
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: priv/plts
key: plts-${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-${{ hashFiles('**/mix.lock') }}-${{ github.sha }}
Expand All @@ -85,9 +82,11 @@ jobs:

- name: Check source code format
run: mix format --check-formatted
if: ${{ matrix.lint }}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Run this only for latest greatest Elixir/Erlang.


- name: Perform source code static analysis
run: mix credo --strict
if: ${{ matrix.lint }}
env:
MIX_ENV: test

Expand All @@ -106,11 +105,13 @@ jobs:

- name: Run tests
run: mix coveralls.github --warnings-as-errors
if: ${{ matrix.lint }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Run dialyzer
run: mix dialyzer
if: ${{ matrix.lint }}
env:
MIX_ENV: test

Expand Down
9 changes: 7 additions & 2 deletions mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,13 @@ defmodule Joken.Mixfile do
deps: deps(),
docs: docs(),
dialyzer: [plt_add_deps: :apps_direct, plt_add_apps: [:jason]],
test_coverage: [tool: ExCoveralls],
preferred_cli_env: [
test_coverage: [tool: ExCoveralls]
]
end

def cli do
[
preferred_envs: [
coveralls: :test,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: setting :preferred_cli_env in your mix.exs "def project" is deprecated, set it inside "def cli" instead:                         
                                                                     
    def cli do       
      [preferred_envs: [coveralls: :test, "coveralls.github": :test, "coveralls.detail": :test, "coveralls.post": :test, "coveralls.html":
 :test]]                                                             
    end

  (mix 1.19.2) lib/mix/cli.ex:187: Mix.CLI.preferred_cli_env/3
  (mix 1.19.2) lib/mix/cli.ex:170: Mix.CLI.maybe_change_env_and_target/2
  (mix 1.19.2) lib/mix/cli.ex:59: Mix.CLI.proceed/2
  /home/ang/.asdf/installs/elixir/1.19.2-otp-28/bin/mix:7: (file)
  (elixir 1.19.2) src/elixir_compiler.erl:81: :elixir_compiler.dispatch/4
  (elixir 1.19.2) src/elixir_compiler.erl:56: :elixir_compiler.compile/4

"coveralls.github": :test,
"coveralls.detail": :test,
Expand Down
Loading