Bump Elixir to 1.16 in CI #164
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
pull_request: | |
push: | |
branches: | |
- main | |
jobs: | |
test: | |
name: Test (Elixir ${{ matrix.elixir }} | Erlang/OTP ${{ matrix.otp }}) | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- otp: "26.2" | |
elixir: "1.16" | |
os: ubuntu-22.04 | |
lint: true | |
coverage: true | |
- otp: "23.3" | |
elixir: "1.11.4" | |
os: ubuntu-20.04 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
MIX_ENV: test | |
steps: | |
- name: Clone repository | |
uses: actions/checkout@v3 | |
- name: Install OTP and Elixir | |
uses: erlef/setup-beam@v1 | |
with: | |
otp-version: ${{ matrix.otp }} | |
elixir-version: ${{ matrix.elixir }} | |
version-type: strict | |
- name: Install dependencies | |
run: mix do deps.get --only test, deps.compile | |
- name: Check for formatted code | |
if: ${{ matrix.lint }} | |
run: mix format --check-formatted | |
- name: Cache/uncache PLTs | |
uses: actions/cache@v3 | |
with: | |
path: | | |
priv/plts | |
key: "${{ runner.os }}-\ | |
erlang-${{ matrix.otp }}-\ | |
elixir-${{ matrix.elixir }}-\ | |
${{ hashFiles('mix.lock') }}" | |
- name: Run Dialyzer | |
run: mix dialyzer | |
- name: Check for unused dependencies | |
if: ${{ matrix.lint }} | |
run: mix do deps.get, deps.unlock --check-unused | |
- name: Check for compilation warnings | |
if: ${{ matrix.lint }} | |
run: mix compile --warnings-as-errors | |
- name: Run tests | |
run: mix test --trace | |
if: ${{ !matrix.coverage }} | |
- name: Run tests with coverage | |
run: mix coveralls.github | |
if: ${{ matrix.coverage }} |