✨ Show fund/loan name in account transaction list #142
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: | |
branches: ["main"] | |
pull_request: | |
branches: ["main"] | |
env: | |
MIX_ENV: test | |
permissions: | |
contents: read | |
jobs: | |
test: | |
name: Run tests and checks | |
runs-on: ubuntu-latest | |
services: | |
db: | |
image: postgres:16.4 | |
ports: ["5432:5432"] | |
env: | |
POSTGRES_PASSWORD: postgres | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set up Elixir | |
id: setup | |
uses: erlef/setup-beam@v1 | |
with: | |
version-file: .tool-versions | |
version-type: strict | |
- name: Cache dependencies | |
id: cache-deps | |
env: | |
cache-name: cache-elixir-deps | |
uses: actions/cache@v4 | |
with: | |
key: ${{runner.os}}-mix-${{env.cache-name}}-${{steps.setup.outputs.otp-version}}-${{steps.setup.outputs.elixir-version}}-${{hashFiles('**/mix.lock')}} | |
path: deps | |
restore-keys: | | |
${{runner.os}}-mix-${{env.cache-name}}-${{steps.setup.outputs.otp-version}}-${{steps.setup.outputs.elixir-version}}- | |
${{runner.os}}-mix-${{env.cache-name}}-${{steps.setup.outputs.otp-version}}- | |
${{runner.os}}-mix-${{env.cache-name}}- | |
- name: Cache compiled build | |
id: cache-build | |
env: | |
cache-name: cache-compiled-build | |
uses: actions/cache@v4 | |
with: | |
key: ${{runner.os}}-mix-${{env.cache-name}}-${{steps.setup.outputs.otp-version}}-${{steps.setup.outputs.elixir-version}}-${{hashFiles('**/mix.lock')}} | |
path: _build | |
restore-keys: | | |
${{runner.os}}-mix-${{env.cache-name}}-${{steps.setup.outputs.otp-version}}-${{steps.setup.outputs.elixir-version}}- | |
${{runner.os}}-mix-${{env.cache-name}}-${{steps.setup.outputs.otp-version}}- | |
${{runner.os}}-mix-${{env.cache-name}}- | |
- name: Cache dialyzer PLTs | |
id: cache-plts | |
env: | |
cache-name: cache-dialyzer-plts | |
uses: actions/cache@v4 | |
with: | |
key: ${{runner.os}}-mix-${{env.cache-name}}-${{steps.setup.outputs.otp-version}}-${{steps.setup.outputs.elixir-version}}-${{hashFiles('**/mix.lock')}} | |
path: | | |
~/.mix | |
priv/plts | |
restore-keys: | | |
${{runner.os}}-mix-${{env.cache-name}}-${{steps.setup.outputs.otp-version}}-${{steps.setup.outputs.elixir-version}}- | |
save-always: true | |
- name: Clean if incremental build fails | |
if: github.run_attempt != '1' | |
run: | | |
mix deps.clean --all | |
mix clean | |
- name: Install dependencies | |
run: mix deps.get | |
- name: Compile for dev | |
env: | |
MIX_ENV: dev | |
run: mix compile | |
- name: Compile for test | |
run: mix compile | |
- name: Generate dialyzer PLTs | |
run: mix dialyzer --plt | |
- name: Check formatting | |
run: mix format --check-formatted | |
- name: Run credo | |
run: mix credo | |
- name: Run tests | |
run: mix test | |
- name: Run dialyzer | |
run: mix dialyzer --format github |