build: update Elixir 1.18.0 and Erlang 27.2 (#29) #44
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
# This workflow uses actions that are not certified by GitHub. | |
# They are provided by a third-party and are governed by | |
# separate terms of service, privacy policy, and support | |
# documentation. | |
name: Elixir CI | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
permissions: | |
contents: read | |
jobs: | |
test: | |
name: Build and test | |
runs-on: ubuntu-latest | |
env: | |
MIX_ENV: test | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- pair: | |
elixir: 1.15.8 | |
otp: 25.3.2.16 | |
- pair: | |
elixir: 1.15.8 | |
otp: 26.2.5.6 | |
- pair: | |
elixir: 1.16.3 | |
otp: 25.3.2.16 | |
- pair: | |
elixir: 1.16.3 | |
otp: 26.2.5.6 | |
- pair: | |
elixir: 1.17.3 | |
otp: 25.3.2.16 | |
- pair: | |
elixir: 1.17.3 | |
otp: 26.2.5.6 | |
- pair: | |
elixir: 1.17.3 | |
otp: 27.2 | |
- pair: | |
elixir: 1.18.0 | |
otp: 25.3.2.16 | |
- pair: | |
elixir: 1.18.0 | |
otp: 26.2.5.6 | |
- pair: | |
elixir: 1.18.0 | |
otp: 27.2 | |
lint: lint | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Elixir | |
uses: erlef/setup-beam@5304e04ea2b355f03681464e683d92e3b2f18451 # v1.18.2 | |
with: | |
elixir-version: ${{ matrix.pair.elixir }} | |
otp-version: ${{ matrix.pair.otp }} | |
- name: Restore dependencies cache | |
uses: actions/cache@v4 | |
with: | |
path: deps | |
key: ${{ runner.os }}-mix-${{ hashFiles('**/mix.lock') }} | |
restore-keys: ${{ runner.os }}-mix- | |
- name: Install dependencies | |
run: mix deps.get --only test | |
- name: Check format | |
run: mix format --check-formatted | |
if: ${{ matrix.lint }} | |
- name: Check unused dependencies | |
run: mix deps.get && mix deps.unlock --check-unused | |
if: ${{ matrix.lint }} | |
- name: Compile Dependencies | |
run: mix deps.compile | |
- name: Compile with warning as errors | |
run: mix compile --warnings-as-errors | |
if: ${{ matrix.lint }} | |
- name: Run tests | |
run: mix test |