Merge pull request #123 from highmobility/level13-4-state-of-health #403
This file contains hidden or 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] | |
| jobs: | |
| mix_test: | |
| name: mix test (Elixir ${{ matrix.elixir }} OTP ${{ matrix.otp }}) | |
| strategy: | |
| matrix: | |
| elixir: ['1.9.4', '1.10.4', '1.11.2'] | |
| include: | |
| - elixir: '1.9.4' | |
| otp: '22.x' | |
| - elixir: '1.10.4' | |
| otp: '22.3' | |
| - elixir: '1.11.2' | |
| otp: '23.1' | |
| runs-on: ubuntu-20.04 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/cache@v3 | |
| with: | |
| path: deps | |
| key: ${{ runner.os }}-mix-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }} | |
| restore-keys: | | |
| ${{ runner.os }}-mix- | |
| - uses: actions/cache@v3 | |
| with: | |
| path: _build | |
| key: build-elixir-${{ matrix.elixir }}-otp-${{ matrix.otp }}-mix-${{ hashFiles('mix.lock') }} | |
| restore-keys: | | |
| build-elixir-${{ matrix.elixir }}-otp-${{ matrix.otp }}-mix- | |
| - uses: erlef/setup-beam@v1 | |
| with: | |
| otp-version: ${{ matrix.otp }} | |
| elixir-version: ${{ matrix.elixir }} | |
| - name: Install Dependencies | |
| run: mix deps.get | |
| - name: Run Tests | |
| run: mix test | |
| - name: Run formatter | |
| run: mix format --check-formatted | |
| - name: Run credo | |
| run: mix credo | |
| - name: Run dialyzer | |
| env: | |
| MIX_ENV: test | |
| run: mix dialyzer --halt-exit-status |