Update actions/cache action to v5 #414
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: | |
| release: | |
| types: [published] | |
| jobs: | |
| ci: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 | |
| - uses: erlef/setup-beam@e6d7c94229049569db56a7ad5a540c051a010af9 # v1.20.4 | |
| id: beam | |
| with: | |
| version-file: .tool-versions | |
| version-type: strict | |
| - name: Restore the deps and _build cache | |
| uses: actions/cache@a7833574556fa59680c1b7cb190c1735db73ebf0 # v5.0.0 | |
| id: restore-cache | |
| env: | |
| OTP_VERSION: ${{ steps.beam.outputs.otp-version }} | |
| ELIXIR_VERSION: ${{ steps.beam.outputs.elixir-version }} | |
| MIX_LOCK_HASH: ${{ hashFiles('**/mix.lock') }} | |
| with: | |
| path: | | |
| deps | |
| _build | |
| key: ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-mixlockhash-${{ env.MIX_LOCK_HASH }} | |
| - name: Install mix dependencies | |
| if: steps.restore-cache.outputs.cache-hit != 'true' | |
| run: mix deps.get | |
| - name: Compile dependencies | |
| if: steps.restore-cache.outputs.cache-hit != 'true' | |
| run: mix deps.compile | |
| - name: Compile | |
| run: mix compile --warnings-as-errors --force | |
| - name: Check Formatting | |
| run: mix format --check-formatted | |
| - name: Check unused deps | |
| run: mix deps.unlock --check-unused | |
| - name: Build docs | |
| run: mix docs --warnings-as-errors | |
| - name: Install mix dependencies for blend | |
| run: mix blend.get | |
| - name: Run Tests (Phoenix LiveView v0.18) | |
| run: BLEND=phoenix_live_view_v0_18 mix test | |
| - name: Run Tests (Phoenix LiveView v0.19) | |
| run: BLEND=phoenix_live_view_v0_19 mix test | |
| - name: Run Tests (Phoenix LiveView v0.20) | |
| run: BLEND=phoenix_live_view_v0_20 mix test | |
| - name: Run Tests (Phoenix LiveView v1.0) | |
| run: BLEND=phoenix_live_view_v1_0 mix test | |
| - name: Run Tests (Phoenix LiveView v1.1) | |
| run: BLEND=phoenix_live_view_v1_1 mix test | |
| - name: Run Tests | |
| run: mix test --warnings-as-errors | |
| - name: Publish package | |
| if: github.event_name == 'release' | |
| env: | |
| HEX_API_KEY: ${{ secrets.HEX_API_KEY }} | |
| run: mix hex.publish --yes |