Merge pull request #287 from kianmeng/fix-typo #108
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: | |
pull_request: | |
branches: | |
- master | |
jobs: | |
test: | |
runs-on: ubuntu-20.04 | |
env: | |
MIX_ENV: test | |
strategy: | |
fail-fast: false | |
matrix: | |
elixir: | |
- "1.13" | |
- "1.14" | |
- "1.15" | |
otp: | |
- "24" | |
- "25" | |
- "26" | |
include: | |
- elixir: "1.15" | |
otp: "26" | |
format: true | |
exclude: | |
- elixir: "1.13" | |
otp: "26" | |
- elixir: "1.14" | |
otp: "26" | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: erlef/setup-beam@v1 | |
with: | |
otp-version: ${{matrix.otp}} | |
elixir-version: ${{matrix.elixir}} | |
- name: Restore deps cache | |
uses: actions/cache@v2 | |
with: | |
path: | | |
deps | |
_build | |
key: deps-${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-${{ hashFiles('**/mix.lock') }}-git-${{ github.sha }} | |
restore-keys: | | |
deps-${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-${{ hashFiles('**/mix.lock') }} | |
deps-${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }} | |
- name: Install package dependencies | |
run: mix deps.get | |
- name: Check code format | |
run: mix format --check-formatted | |
if: ${{ matrix.format }} | |
- name: Compile dependencies | |
run: mix compile | |
env: | |
MIX_ENV: test | |
- name: Run unit tests | |
run: mix test | |
- 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 |