4545 otp_version : ' 26.2'
4646 - elixir_version : ' 1.18'
4747 otp_version : ' 27.3'
48+ type_check : true
49+ lint : true
4850
4951 steps :
5052 - name : Checkout
@@ -66,26 +68,27 @@ jobs:
6668 with :
6769 path : tools/plts
6870 key : erlef-${{ runner.os }}-dialyzer-${{ matrix.elixir_version }}-${{ matrix.otp_version }}-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }}
69- if : contains( matrix.elixir_version, '1.18')
71+ if : ${{ matrix.type_check }}
7072 - run : mix deps.get
7173 - run : MIX_ENV=test mix compile --warnings-as-errors
7274 - run : mix credo
73- if : contains( matrix.elixir_version, '1.18')
75+ if : ${{ matrix.lint }}
7476 - name : Check if formatted
75- if : contains( matrix.elixir_version, '1.18')
77+ if : ${{ matrix.lint }}
7678 run : mix format --check-formatted
7779 - name : Actual Tests
7880 # this will let warnings slip through but I don't wanna replicate all that magic
7981 # right now
8082 run : MIX_ENV=test mix coveralls.github || mix test --failed
8183 # Apparently the one with `!` can't go without the fancy expression syntax
82- if : ${{ !contains(matrix.elixir_version, '1.18') }}
84+ if : ${{ !matrix.lint }}
85+ # warnings as errors is a form of linting!
8386 - name : Actual Tests WITH warnings as errors
8487 run : MIX_ENV=test mix coveralls.github --warnings-as-errors || mix test --failed
85- if : contains( matrix.elixir_version, '1.18')
88+ if : ${{ matrix.lint }}
8689 - name : Dialyzer
8790 run : mix dialyzer --halt-exit-status
88- if : contains( matrix.elixir_version, '1.18')
91+ if : ${{ matrix.type_check }}
8992
9093 macos :
9194 name : Test on MacOS
0 commit comments