Release 0.5.0 documentation #185
This file contains hidden or 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}} | |
| services: | |
| db: | |
| image: postgres:16 | |
| ports: ["5432:5432"] | |
| env: | |
| POSTGRES_USER: ${{ vars.POSTGRES_USERNAME }} | |
| POSTGRES_PASSWORD: ${{ secrets.POSTGRES_PASSWORD }} | |
| options: >- | |
| --health-cmd pg_isready | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| strategy: | |
| matrix: | |
| elixir: ["1.17", "1.18", "1.19"] | |
| otp: ["27", "28"] | |
| os: [ubuntu-24.04] | |
| exclude: | |
| # Elixir 1.17 supports OTP 25-27 only | |
| - elixir: "1.17" | |
| otp: "28" | |
| # Elixir 1.18 supports OTP 25-27 only | |
| - elixir: "1.18" | |
| otp: "28" | |
| 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: Install dependencies | |
| run: mix deps.get | |
| - name: Reset database and run migrations | |
| env: | |
| POSTGRES_USERNAME: ${{ vars.POSTGRES_USERNAME }} | |
| POSTGRES_PASSWORD: ${{ secrets.POSTGRES_PASSWORD }} | |
| POSTGRES_HOSTNAME: ${{ vars.POSTGRES_HOSTNAME }} | |
| SECRET_KEY_BASE: ${{ secrets.SECRET_KEY_BASE }} | |
| MIX_ENV: test | |
| run: mix ecto.drop && mix ecto.create && mix 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 | |
| env: | |
| POSTGRES_USERNAME: ${{ vars.POSTGRES_USERNAME }} | |
| POSTGRES_PASSWORD: ${{ secrets.POSTGRES_PASSWORD }} | |
| POSTGRES_HOSTNAME: ${{ vars.POSTGRES_HOSTNAME }} | |
| SECRET_KEY_BASE: ${{ secrets.SECRET_KEY_BASE }} | |
| MIX_ENV: test | |
| run: mix test |