fix!: makes get/2
return within :ok/:error tuples
#24
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: main | |
on: | |
push: | |
env: | |
OTP_VERSION: "27" | |
ELIXIR_VERSION: "1.17" | |
jobs: | |
style: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: erlef/setup-beam@v1 | |
with: | |
otp-version: ${{ env.OTP_VERSION }} | |
elixir-version: ${{ env.ELIXIR_VERSION }} | |
- uses: actions/cache@v3 | |
with: | |
path: deps | |
key: deps_${{ runner.os }}_${{ hashFiles('mix.lock') }} | |
- run: mix do deps.get + deps.compile + compile | |
- run: mix format --check-formatted | |
analysis: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: erlef/setup-beam@v1 | |
with: | |
otp-version: ${{ env.OTP_VERSION }} | |
elixir-version: ${{ env.ELIXIR_VERSION }} | |
- uses: actions/cache@v3 | |
with: | |
path: deps | |
key: deps_${{ runner.os }}_${{ hashFiles('mix.lock') }} | |
- run: mix do deps.get + deps.compile + compile | |
- run: mix dialyzer | |
test: | |
runs-on: ubuntu-latest | |
services: | |
postgres: | |
image: postgres:16.1-alpine3.19 | |
ports: | |
- 5432:5432 | |
env: | |
POSTGRES_PASSWORD: postgres | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: erlef/setup-beam@v1 | |
with: | |
otp-version: ${{ env.OTP_VERSION }} | |
elixir-version: ${{ env.ELIXIR_VERSION }} | |
- uses: actions/cache@v3 | |
with: | |
path: deps | |
key: deps_${{ runner.os }}_${{ hashFiles('mix.lock') }} | |
- run: MIX_ENV=test mix do deps.get + deps.compile + compile | |
- run: mix test |