Skip to content

Commit

Permalink
Update home_live.ex
Browse files Browse the repository at this point in the history
  • Loading branch information
brianberlin committed Feb 29, 2024
1 parent e8d2756 commit 25c4ddb
Show file tree
Hide file tree
Showing 4 changed files with 544 additions and 80 deletions.
148 changes: 71 additions & 77 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,52 +22,52 @@ jobs:
- name: Checkout
uses: actions/checkout@v2

- name: Elixir
uses: erlef/setup-beam@v1.11
id: setup
with:
otp-version: ${{ env.OTP_VERSION_SPEC }}
elixir-version: ${{ env.ELIXIR_VERSION_SPEC }}
env:
ImageOS: ubuntu20

- name: Restore Deps Cache
uses: actions/cache/restore@v3
id: deps-cache
with:
path: deps
key: deps-${{ runner.os }}-${{ env.OTP_VERSION_SPEC }}-${{ env.ELIXIR_VERSION_SPEC }}-${{ hashFiles('mix.lock') }}

- name: Restore Build Cache
uses: actions/cache/restore@v3
id: build-cache
with:
path: _build
key: build-${{ runner.os }}-${{ env.OTP_VERSION_SPEC }}-${{ env.ELIXIR_VERSION_SPEC }}-${{ hashFiles('mix.lock') }}

- name: Restore PLT cache
uses: actions/cache@v2
id: plt-cache
with:
key: plt-${{ runner.os }}-${{ env.OTP_VERSION_SPEC }}-${{ env.ELIXIR_VERSION_SPEC }}
path: priv/plts

- name: Install Mix Dependencies
if: steps.deps-cache.outputs.cache-hit != 'true'
run: mix deps.get

- name: Compile
if: steps.build-cache.outputs.cache-hit != 'true'
run: mix compile

- name: Check Formatting
run: mix format --check-formatted

- name: Run Credo
run: mix credo --strict

- name: Run Tests
run: mix test --cover --export-coverage default
# - name: Elixir
# uses: erlef/setup-beam@v1.11
# id: setup
# with:
# otp-version: ${{ env.OTP_VERSION_SPEC }}
# elixir-version: ${{ env.ELIXIR_VERSION_SPEC }}
# env:
# ImageOS: ubuntu20

# - name: Restore Deps Cache
# uses: actions/cache/restore@v3
# id: deps-cache
# with:
# path: deps
# key: deps-${{ runner.os }}-${{ env.OTP_VERSION_SPEC }}-${{ env.ELIXIR_VERSION_SPEC }}-${{ hashFiles('mix.lock') }}

# - name: Restore Build Cache
# uses: actions/cache/restore@v3
# id: build-cache
# with:
# path: _build
# key: build-${{ runner.os }}-${{ env.OTP_VERSION_SPEC }}-${{ env.ELIXIR_VERSION_SPEC }}-${{ hashFiles('mix.lock') }}

# - name: Restore PLT cache
# uses: actions/cache@v2
# id: plt-cache
# with:
# key: plt-${{ runner.os }}-${{ env.OTP_VERSION_SPEC }}-${{ env.ELIXIR_VERSION_SPEC }}
# path: priv/plts

# - name: Install Mix Dependencies
# if: steps.deps-cache.outputs.cache-hit != 'true'
# run: mix deps.get

# - name: Compile
# if: steps.build-cache.outputs.cache-hit != 'true'
# run: mix compile

# - name: Check Formatting
# run: mix format --check-formatted

# - name: Run Credo
# run: mix credo --strict

# - name: Run Tests
# run: mix test --cover

- name: Coverage Reporter
uses: peek-travel/coverage-reporter@partitioned-lcov-results
Expand All @@ -77,34 +77,28 @@ jobs:
lcov_path: cover/lcov.info
coverage_threshold: 80

- name: Create Coverage Report Artifact
uses: actions/upload-artifact@v3
with:
name: code-coverage
path: cover/reports/coverage_report.txt

- name: Create PLTs
if: steps.plt-cache.outputs.cache-hit != 'true'
run: MIX_ENV=dev mix dialyzer --plt

- name: Run dialyzer
run: MIX_ENV=dev mix dialyzer --format github

- name: Save Build Cache
uses: actions/cache/save@v3
with:
path: _build
key: build-${{ runner.os }}-${{ env.OTP_VERSION_SPEC }}-${{ env.ELIXIR_VERSION_SPEC }}-${{ hashFiles('mix.lock') }}

- name: Save Deps Cache
uses: actions/cache/save@v3
with:
path: deps
key: deps-${{ runner.os }}-${{ env.OTP_VERSION_SPEC }}-${{ env.ELIXIR_VERSION_SPEC }}-${{ hashFiles('mix.lock') }}

- name: Save PLT cache
id: plt-cache-save
uses: actions/cache/save@v3
with:
path: priv/plts
key: plt-${{ runner.os }}-${{ env.OTP_VERSION_SPEC }}-${{ env.ELIXIR_VERSION_SPEC }}
# - name: Create PLTs
# if: steps.plt-cache.outputs.cache-hit != 'true'
# run: MIX_ENV=dev mix dialyzer --plt

# - name: Run dialyzer
# run: MIX_ENV=dev mix dialyzer --format github

# - name: Save Build Cache
# uses: actions/cache/save@v3
# with:
# path: _build
# key: build-${{ runner.os }}-${{ env.OTP_VERSION_SPEC }}-${{ env.ELIXIR_VERSION_SPEC }}-${{ hashFiles('mix.lock') }}

# - name: Save Deps Cache
# uses: actions/cache/save@v3
# with:
# path: deps
# key: deps-${{ runner.os }}-${{ env.OTP_VERSION_SPEC }}-${{ env.ELIXIR_VERSION_SPEC }}-${{ hashFiles('mix.lock') }}

# - name: Save PLT cache
# id: plt-cache-save
# uses: actions/cache/save@v3
# with:
# path: priv/plts
# key: plt-${{ runner.os }}-${{ env.OTP_VERSION_SPEC }}-${{ env.ELIXIR_VERSION_SPEC }}
4 changes: 2 additions & 2 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
erlang 26.0
elixir 1.14.5-otp-26
elixir 1.15.7-otp-26
erlang 26.1
Loading

0 comments on commit 25c4ddb

Please sign in to comment.