Modernize actions #123
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: | |
| pull_request: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| test: | |
| runs-on: ubuntu-24.04 | |
| env: | |
| MIX_ENV: test | |
| GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| # Minimum supported versions. | |
| # OTP 24.2 is the earliest available on ubuntu-22.04. | |
| # Elixir 1.13 is the minimum required by transitive dep :jose. | |
| - elixir: "1.13" | |
| otp: "24" | |
| # Latest versions. | |
| - elixir: "1.19" | |
| otp: "28" | |
| lint: lint | |
| steps: | |
| - name: Check out this repository | |
| uses: actions/checkout@v6 | |
| - name: Set up Erlang and Elixir | |
| uses: erlef/setup-beam@v1 | |
| with: | |
| otp-version: ${{matrix.otp}} | |
| elixir-version: ${{matrix.elixir}} | |
| - name: Cache Mix dependencies | |
| uses: actions/cache@v5 | |
| id: cache-deps | |
| with: | |
| path: | | |
| deps | |
| _build | |
| key: | | |
| mix-${{ runner.os }}-${{matrix.elixir}}-${{matrix.otp}}-${{ hashFiles('**/mix.lock') }} | |
| restore-keys: | | |
| mix-${{ runner.os }}-${{matrix.elixir}}-${{matrix.otp}}- | |
| - run: mix do deps.get --check-locked, deps.compile | |
| if: steps.cache-deps.outputs.cache-hit != 'true' | |
| - run: mix format --check-formatted | |
| if: ${{ matrix.lint }} | |
| - run: mix deps.unlock --check-unused | |
| if: ${{ matrix.lint }} | |
| - run: mix compile --warnings-as-errors | |
| if: ${{ matrix.lint }} | |
| - run: mix test |