diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..0a47213 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,40 @@ +name: Elixir CI + +on: + push: + branches: + - main + pull_request: + branches: + - main + +jobs: + test: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Set up Elixir + uses: erlef/setup-beam@v1 + with: + elixir-version: "1.15" + otp-version: "26.0" + + - name: Cache dependencies + uses: actions/cache@v3 + with: + path: deps + key: ${{ runner.os }}-mix-${{ hashFiles('mix.lock') }} + restore-keys: | + ${{ runner.os }}-mix- + + - name: Install dependencies + run: | + mix local.hex --force + mix local.rebar --force + mix deps.get + + - name: Run tests + run: mix test diff --git a/lib/save_it.ex b/lib/save_it.ex new file mode 100644 index 0000000..90db469 --- /dev/null +++ b/lib/save_it.ex @@ -0,0 +1,5 @@ +defmodule SaveIt do + def hello do + :world + end +end diff --git a/lib/small_sdk/typesense.ex b/lib/small_sdk/typesense.ex index c878012..6260713 100644 --- a/lib/small_sdk/typesense.ex +++ b/lib/small_sdk/typesense.ex @@ -23,6 +23,7 @@ defmodule SmallSdk.Typesense do end def create_search_key() do + {url, _} = get_env() req = build_request("/keys") {:ok, res} =