Merge pull request #86 from Flo0807/bump-phoenix-live-view #172
This file contains 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@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 | |
- uses: erlef/setup-beam@5304e04ea2b355f03681464e683d92e3b2f18451 # v1 | |
id: beam | |
with: | |
version-file: .tool-versions | |
version-type: strict | |
- name: Restore the deps and _build cache | |
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4 | |
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: Run Tests | |
run: mix test | |
- name: Publish package | |
if: github.event_name == 'release' | |
env: | |
HEX_API_KEY: ${{ secrets.HEX_API_KEY }} | |
run: mix hex.publish --yes |