Cleans up CI and looser Elixir version requirement #17
Workflow file for this run
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: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| test: | |
| name: Test (Elixir ${{ matrix.elixir }} / OTP ${{ matrix.otp }}${{ matrix.unlock && ' / unlock' || '' }}) | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - elixir: "1.15.0" | |
| otp: "24.3" | |
| unlock: false | |
| - elixir: "1.19.5" | |
| otp: "28.5" | |
| unlock: false | |
| - elixir: "1.19.5" | |
| otp: "28.5" | |
| unlock: true | |
| env: | |
| MIX_ENV: test | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: erlef/setup-beam@v1 | |
| with: | |
| elixir-version: ${{ matrix.elixir }} | |
| otp-version: ${{ matrix.otp }} | |
| - uses: actions/cache@v5 | |
| with: | |
| path: | | |
| deps | |
| _build | |
| key: ${{ runner.os }}-mix-${{ matrix.elixir }}-${{ matrix.otp }}-${{ hashFiles('**/mix.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-mix-${{ matrix.elixir }}-${{ matrix.otp }}- | |
| - name: Check formatting | |
| run: mix format --check-formatted | |
| - name: Unlock deps | |
| if: matrix.unlock | |
| run: mix deps.unlock --all | |
| - name: Check for unused deps in mix.lock | |
| if: '!matrix.unlock' | |
| run: mix deps.unlock --check-unused | |
| - name: Install dependencies | |
| run: mix deps.get | |
| - name: Compile with warnings as errors | |
| run: mix compile --warnings-as-errors | |
| - name: Run Credo | |
| run: mix credo --strict | |
| - name: Run tests | |
| run: mix test |