Feat/add default context when it's missing #107
Workflow file for this run
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: Kanta Development | |
on: | |
push: | |
branches: ["develop"] | |
pull_request: | |
branches: ["develop"] | |
env: | |
MIX_ENV: dev | |
permissions: | |
contents: read | |
jobs: | |
build: | |
name: OS ${{matrix.os}} / Elixir ${{matrix.elixir}} / OTP ${{matrix.otp}} | |
strategy: | |
matrix: | |
elixir: ['1.14', '1.15', '1.16', '1.17'] | |
otp: ['24', '25', '26', '27'] | |
os: [ubuntu-24.04] | |
exclude: | |
# Elixir 1.14 | |
- elixir: '1.14' | |
otp: '27' | |
# Elixir 1.15 | |
- elixir: '1.15' | |
otp: '27' | |
# Elixir 1.16 | |
- elixir: '1.16' | |
otp: '27' | |
# Elixir 1.17 | |
- elixir: '1.17' | |
otp: '24' | |
runs-on: ${{matrix.os}} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set up Elixir | |
uses: erlef/setup-beam@v1 | |
with: | |
otp-version: ${{matrix.otp}} | |
elixir-version: ${{matrix.elixir}} | |
- name: Restore dependencies cache | |
uses: actions/cache@v4 | |
with: | |
path: deps | |
key: ${{ runner.os }}-mix-${{ hashFiles('**/mix.lock') }} | |
restore-keys: ${{ runner.os }}-mix- | |
- name: Set up Postgres | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y postgresql | |
sudo service postgresql start | |
sudo -u postgres psql -c "ALTER USER postgres WITH PASSWORD 'postgres';" | |
- name: Install dependencies | |
run: mix deps.get | |
- name: Create database | |
run: mix do ecto.create, ecto.migrate | |
- name: Compile code | |
run: mix compile --warnings-as-errors | |
- name: Check Formatting | |
run: mix format --check-formatted | |
- name: Dialyzer | |
run: mix dialyzer -Wno_match --format short 2>&1 | |
- name: Credo | |
run: mix credo | |
- name: Run tests | |
run: MIX_ENV=test mix test |