Update ci #214
Workflow file for this run
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
# Created with GitHubActions version 0.2.24 | |
name: CI | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
on: | |
- pull_request | |
- push | |
jobs: | |
linux: | |
name: Test on Ubuntu (Elixir ${{ matrix.elixir }}, OTP ${{ matrix.otp }}) | |
runs-on: ubuntu-20.04 | |
strategy: | |
fail-fast: false | |
matrix: | |
elixir: | |
- '1.13.4' | |
- '1.14.5' | |
- '1.15.8' | |
- '1.16.3' | |
- '1.17.2' | |
otp: | |
- '22.3' | |
- '23.3' | |
- '24.3' | |
- '25.3' | |
- '26.2' | |
- '27.0' | |
exclude: | |
- elixir: '1.13.4' | |
otp: '26.2' | |
- elixir: '1.13.4' | |
otp: '27.0' | |
- elixir: '1.14.5' | |
otp: '22.3' | |
- elixir: '1.14.5' | |
otp: '27.0' | |
- elixir: '1.15.8' | |
otp: '22.3' | |
- elixir: '1.15.8' | |
otp: '23.3' | |
- elixir: '1.15.8' | |
otp: '27.0' | |
- elixir: '1.16.3' | |
otp: '22.3' | |
- elixir: '1.16.3' | |
otp: '23.3' | |
- elixir: '1.16.3' | |
otp: '27.0' | |
- elixir: '1.17.2' | |
otp: '22.3' | |
- elixir: '1.17.2' | |
otp: '23.3' | |
- elixir: '1.17.2' | |
otp: '24.3' | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Elixir | |
uses: erlef/setup-beam@v1 | |
with: | |
elixir-version: ${{ matrix.elixir }} | |
otp-version: ${{ matrix.otp }} | |
- name: Restore deps | |
uses: actions/cache@v4 | |
with: | |
path: deps | |
key: deps-${{ runner.os }}-${{ matrix.elixir }}-${{ matrix.otp }}-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }} | |
- name: Restore _build | |
uses: actions/cache@v4 | |
with: | |
path: _build | |
key: _build-${{ runner.os }}-${{ matrix.elixir }}-${{ matrix.otp }}-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }} | |
- name: Restore test/support/plts | |
uses: actions/cache@v4 | |
with: | |
path: test/support/plts | |
key: test/support/plts-${{ runner.os }}-${{ matrix.elixir }}-${{ matrix.otp }}-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }} | |
if: ${{ contains(matrix.elixir, '1.17.2') && contains(matrix.otp, '27.0') }} | |
- name: Get dependencies | |
run: mix deps.get | |
- name: Compile dependencies | |
run: MIX_ENV=test mix deps.compile | |
- name: Compile project | |
run: MIX_ENV=test mix compile --warnings-as-errors | |
- name: Check unused dependencies | |
if: ${{ contains(matrix.elixir, '1.17.2') && contains(matrix.otp, '27.0') }} | |
run: mix deps.unlock --check-unused | |
- name: Check code format | |
if: ${{ contains(matrix.elixir, '1.17.2') && contains(matrix.otp, '27.0') }} | |
run: mix format --check-formatted | |
- name: Lint code | |
if: ${{ contains(matrix.elixir, '1.17.2') && contains(matrix.otp, '27.0') }} | |
run: mix credo --strict | |
- name: Run tests | |
run: mix test | |
if: ${{ !(contains(matrix.elixir, '1.17.2') && contains(matrix.otp, '27.0')) }} | |
- name: Run tests with coverage | |
run: mix coveralls.github | |
if: ${{ contains(matrix.elixir, '1.17.2') && contains(matrix.otp, '27.0') }} | |
- name: Static code analysis | |
run: mix dialyzer --format github --force-check | |
if: ${{ contains(matrix.elixir, '1.17.2') && contains(matrix.otp, '27.0') }} |