chore: add CI #1
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: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
permissions: | |
contents: read | |
jobs: | |
mix_check: | |
name: Elixir ${{ matrix.elixir }} / OTP ${{ matrix.otp }} | |
runs-on: ubuntu-20.04 | |
strategy: | |
# Following matrix is maintained by following https://hexdocs.pm/elixir/compatibility-and-deprecations.html | |
# And, only the most recent 3 versions of Elixir are involved. | |
matrix: | |
include: | |
# Elixir v1.17 | |
- { elixir: '1.17.x', otp: '27.x' } | |
- { elixir: '1.17.x', otp: '26.x' } | |
- { elixir: '1.17.x', otp: '25.x' } | |
# Elixir v1.16 | |
- { elixir: '1.16.x', otp: '26.x' } | |
- { elixir: '1.16.x', otp: '25.x' } | |
- { elixir: '1.16.x', otp: '24.x' } | |
# Elixir v1.15 | |
- { elixir: '1.15.x', otp: '26.x' } | |
- { elixir: '1.15.x', otp: '25.x' } | |
- { elixir: '1.15.x', otp: '24.x' } | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Elixir | |
uses: erlef/setup-beam@v1 | |
with: | |
elixir-version: ${{ matrix.elixir }} | |
otp-version: ${{ matrix.otp }} | |
- name: Restore dependencies cache | |
uses: actions/cache@v4 | |
with: | |
path: deps | |
key: ${{ runner.os }}-elixir_${{ matrix.elixir }}-otp_${{ matrix.otp }}-mix_${{ hashFiles('**/mix.lock') }} | |
restore-keys: ${{ runner.os }}-elixir_${{ matrix.elixir }}-otp_${{ matrix.otp }}-mix | |
- name: Install dependencies | |
run: mix deps.get | |
- name: Run mix check | |
run: mix check |