move log #54
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" ] | |
| env: | |
| ELIXIR_VERSION: 1.15 | |
| OTP_VERSION: 25.x | |
| jobs: | |
| CI: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup BEAM | |
| uses: erlef/setup-beam@v1 | |
| id: beam | |
| with: | |
| elixir-version: ${{ env.ELIXIR_VERSION }} | |
| otp-version: ${{ env.OTP_VERSION }} | |
| - name: Restore Mix Dependencies Cache | |
| uses: actions/cache/restore@v4 | |
| id: mix_cache | |
| with: | |
| path: | | |
| _build | |
| deps | |
| key: mix-${{runner.os}}-${{steps.beam.outputs.otp-version}}-${{steps.beam.outputs.elixir-version}}-${{ hashFiles('mix.lock') }}-${{ github.ref }} | |
| restore-keys: | | |
| mix-${{runner.os}}-${{steps.beam.outputs.otp-version}}-${{steps.beam.outputs.elixir-version}}-${{ hashFiles('mix.lock') }}-refs/heads/${{ github.event.repository.default_branch }} | |
| mix-${{runner.os}}-${{steps.beam.outputs.otp-version}}-${{steps.beam.outputs.elixir-version}}-${{ hashFiles('mix.lock') }} | |
| mix-${{runner.os}}-${{steps.beam.outputs.otp-version}}-${{steps.beam.outputs.elixir-version}}- | |
| - name: Install Mix Dependencies | |
| if: steps.mix_cache.outputs.cache-hit != 'true' | |
| run: | | |
| mix local.rebar --force | |
| mix local.hex --force | |
| mix deps.get | |
| mix deps.compile | |
| - name: Save Mix cache | |
| uses: actions/cache/save@v4 | |
| if: steps.mix_cache.outputs.cache-hit != 'true' | |
| id: mix_cache_save | |
| with: | |
| key: mix-${{runner.os}}-${{steps.beam.outputs.otp-version}}-${{steps.beam.outputs.elixir-version}}-${{ hashFiles('mix.lock') }}-${{ github.ref }} | |
| path: | | |
| _build | |
| deps | |
| - name: Check compiler warnings | |
| run: mix compile --warnings-as-errors | |
| - name: Run tests | |
| run: mix test --cover --exclude pending | |
| - name: Check formatting | |
| run: mix format --check-formatted | |
| - name: Run Credo | |
| run: mix credo | |
| # Cache key based on Elixir & Erlang version | |
| - name: Restore PLT cache | |
| uses: actions/cache@v4 | |
| id: plt_cache | |
| with: | |
| path: | | |
| priv/plts | |
| key: plt-${{runner.os}}-${{steps.beam.outputs.otp-version}}-${{steps.beam.outputs.elixir-version}}-${{hashFiles('**/mix.lock')}}-${{hashFiles('**/*.ex')}} | |
| restore-keys: | | |
| plt-${{runner.os}}-${{steps.beam.outputs.otp-version}}-${{steps.beam.outputs.elixir-version}}-${{hashFiles('**/mix.lock')}}-${{hashFiles('**/*.ex')}} | |
| plt-${{runner.os}}-${{steps.beam.outputs.otp-version}}-${{steps.beam.outputs.elixir-version}}-${{hashFiles('**/mix.lock')}}- | |
| plt-${{runner.os}}-${{steps.beam.outputs.otp-version}}-${{steps.beam.outputs.elixir-version}}- | |
| plt-${{runner.os}}-${{steps.beam.outputs.otp-version}}- | |
| # Create PLTs if no cache was found. | |
| # Always rebuild PLT when a job is retried | |
| # (If they were cached at all, they'll be updated when we run mix dialyzer with no flags.) | |
| - name: Create PLTs | |
| if: steps.plt_cache.outputs.cache-hit != 'true' || github.run_attempt != '1' | |
| run: mix dialyzer --plt | |
| - name: Run Dialyzer | |
| run: mix dialyzer --format github |