feat: add LLM-compiled knowledge base system #94
Workflow file for this run
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: CI | |
| on: | |
| push: | |
| branches: [master] | |
| tags: ["v*"] | |
| pull_request: | |
| branches: [master] | |
| permissions: | |
| contents: read | |
| env: | |
| FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true | |
| MIX_ENV: test | |
| ELIXIR_VERSION: "1.18.3" | |
| OTP_VERSION: "27.2" | |
| jobs: | |
| compile: | |
| name: Compile & Warnings | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: erlef/setup-beam@v1 | |
| with: | |
| elixir-version: ${{ env.ELIXIR_VERSION }} | |
| otp-version: ${{ env.OTP_VERSION }} | |
| - name: Cache deps & build | |
| uses: actions/cache@v5 | |
| with: | |
| path: | | |
| deps | |
| _build | |
| key: ${{ runner.os }}-mix-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ hashFiles('mix.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-mix-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}- | |
| - run: mix deps.get | |
| - run: mix deps.compile | |
| - name: Compile with warnings as errors | |
| run: mix compile --warnings-as-errors | |
| format: | |
| name: Formatting | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: erlef/setup-beam@v1 | |
| with: | |
| elixir-version: ${{ env.ELIXIR_VERSION }} | |
| otp-version: ${{ env.OTP_VERSION }} | |
| - name: Cache deps | |
| uses: actions/cache@v5 | |
| with: | |
| path: deps | |
| key: ${{ runner.os }}-mix-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ hashFiles('mix.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-mix-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}- | |
| - run: mix deps.get | |
| - run: mix format --check-formatted | |
| credo: | |
| name: Credo | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: erlef/setup-beam@v1 | |
| with: | |
| elixir-version: ${{ env.ELIXIR_VERSION }} | |
| otp-version: ${{ env.OTP_VERSION }} | |
| - name: Cache deps & build | |
| uses: actions/cache@v5 | |
| with: | |
| path: | | |
| deps | |
| _build | |
| key: ${{ runner.os }}-mix-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ hashFiles('mix.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-mix-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}- | |
| - run: mix deps.get | |
| - run: mix credo --strict | |
| test: | |
| name: Tests (${{ matrix.os }} / OTP ${{ matrix.otp }} / Elixir ${{ matrix.elixir }}) | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - os: ubuntu-latest | |
| elixir: "1.18.3" | |
| otp: "27.2" | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: erlef/setup-beam@v1 | |
| with: | |
| elixir-version: ${{ matrix.elixir }} | |
| otp-version: ${{ matrix.otp }} | |
| - name: Cache deps & build | |
| uses: actions/cache@v5 | |
| with: | |
| path: | | |
| deps | |
| _build | |
| key: ${{ runner.os }}-mix-${{ matrix.elixir }}-${{ matrix.otp }}-${{ hashFiles('mix.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-mix-${{ matrix.elixir }}-${{ matrix.otp }}- | |
| - run: mix deps.get | |
| - run: mix deps.compile | |
| - run: mix compile | |
| - run: mix test | |
| dialyzer: | |
| name: Dialyzer | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: erlef/setup-beam@v1 | |
| with: | |
| elixir-version: ${{ env.ELIXIR_VERSION }} | |
| otp-version: ${{ env.OTP_VERSION }} | |
| - name: Cache deps & build | |
| uses: actions/cache@v5 | |
| with: | |
| path: | | |
| deps | |
| _build | |
| key: ${{ runner.os }}-mix-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ hashFiles('mix.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-mix-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}- | |
| - name: Cache PLTs | |
| uses: actions/cache@v5 | |
| with: | |
| path: priv/plts | |
| key: ${{ runner.os }}-plt-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ hashFiles('mix.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-plt-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}- | |
| - run: mix deps.get | |
| - run: mix deps.compile | |
| - run: mix compile | |
| - run: mix dialyzer | |
| publish: | |
| name: Publish to Hex | |
| runs-on: ubuntu-latest | |
| needs: [compile, format, credo, test, dialyzer] | |
| if: startsWith(github.ref, 'refs/tags/v') | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: erlef/setup-beam@v1 | |
| with: | |
| elixir-version: ${{ env.ELIXIR_VERSION }} | |
| otp-version: ${{ env.OTP_VERSION }} | |
| - name: Set version from tag | |
| run: | | |
| TAG_VERSION="${GITHUB_REF#refs/tags/v}" | |
| sed -i "s/@version \".*\"/@version \"${TAG_VERSION}\"/" mix.exs | |
| grep '@version' mix.exs | |
| - run: mix deps.get | |
| env: | |
| MIX_ENV: dev | |
| - run: mix compile | |
| env: | |
| MIX_ENV: dev | |
| - name: Publish to Hex | |
| run: mix hex.publish --yes | |
| env: | |
| MIX_ENV: dev | |
| HEX_API_KEY: ${{ secrets.HEX_API_KEY }} |