Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci_v29.0.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
- typesense: '29.0'
otp: '28'
elixir: '1.18'
lint: true
lint: false

services:
typesense:
Expand Down
172 changes: 172 additions & 0 deletions .github/workflows/ci_v30.0.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,172 @@
name: CI v30.0

on:
workflow_call:
pull_request:
branches: ["main"]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
# https://docs.github.com/en/actions/managing-workflow-runs/skipping-workflow-runs
# Workflows that would otherwise be triggered using `on: push` or
# `on: pull_request` won't be triggered if you add any of the
# following strings to the commit message in a push, or the HEAD
# commit of a pull request:
# - [skip ci]
# - [ci skip]
# - [no ci]
# - [skip actions]
# - [actions skip]

test:
if: ${{ (github.event_name == 'push' || github.event_name == 'pull_request') && github.repository == 'jaeyson/open_api_typesense' }}
runs-on: ubuntu-latest
environment: review

env:
MIX_ENV: test
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
LATEST_TYPESENSE: '30.0'

strategy:
matrix:
include:
- typesense: '30.0'
otp: '25'
elixir: '1.14'
lint: false
- typesense: '29.0'
otp: '28'
elixir: '1.18'
lint: true

services:
typesense:
image: typesense/typesense:${{ matrix.typesense }}

steps:
- name: Checkout repo
uses: actions/checkout@v4

- name: Check for misspellings
uses: codespell-project/actions-codespell@v2

Check warning on line 55 in .github/workflows/ci_v30.0.yml

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

.github/workflows/ci_v30.0.yml#L55

An action sourced from a third-party repository on GitHub is not pinned to a full length commit SHA. Pinning an action to a full length commit SHA is currently the only way to use an action as an immutable release.

- name: Start Typesense
run: |
docker run -id \
-p 8108:8108 \
--name typesense \
-v /tmp/typesense-data:/data \
-v /tmp/typesense-analytics-data:/analytics-data \
typesense/typesense:${{ matrix.typesense}} \
--api-key xyz \
--data-dir /data \
--enable-search-analytics=true \
--analytics-dir=/analytics-data \
--analytics-flush-interval=60 \
--analytics-minute-rate-limit=100 \
--enable-cors

- name: Wait for Typesense to be healthy
shell: bash
run: |
start_time=$(date +%s)
timeout=30
counter=0
until curl -s http://localhost:8108/health | grep -q '"ok":true'; do
if [ $counter -eq $timeout ]; then
echo "Timed out waiting for Typesense to be healthy"
exit 1
fi
echo "Waiting for Typesense to be healthy..."
sleep 1
counter=$((counter + 1))
done
end_time=$(date +%s)
elapsed=$((end_time - start_time))
echo "Typesense healthcheck elapsed: ${elapsed}s"

- name: Setup Elixir/OTP
uses: erlef/setup-beam@v1

Check warning on line 93 in .github/workflows/ci_v30.0.yml

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

.github/workflows/ci_v30.0.yml#L93

An action sourced from a third-party repository on GitHub is not pinned to a full length commit SHA. Pinning an action to a full length commit SHA is currently the only way to use an action as an immutable release.
with:
otp-version: ${{matrix.otp}}
elixir-version: ${{matrix.elixir}}

- name: Cache dependencies/builds
uses: actions/cache@v4
with:
path: |
deps
_build
key: ${{ runner.os }}-typesense-${{ matrix.typesense}}-${{ matrix.otp}}-${{ matrix.elixir}}-mix-${{ hashFiles('**/mix.lock') }}
restore-keys: |
${{ runner.os }}-typesense-${{ matrix.typesense}}-${{ matrix.otp }}-${{ matrix.elixir }}-mix-

- name: Install Dependencies
run: |
mix local.rebar --if-missing
mix local.hex --if-missing
mix deps.get

- name: Find unused dependencies
run: mix deps.unlock --check-unused
if: ${{ matrix.lint }}

- name: Check retired dependencies
run: mix hex.audit
if: ${{ matrix.lint }}

- name: Security audit of dependencies
run: mix deps.audit
if: ${{ matrix.lint }}

- name: Compile project
run: mix compile --all-warnings

- name: Run static analysis
run: mix credo --all --strict
if: ${{ matrix.lint }}

- name: Check format files
run: mix format --check-formatted
if: ${{ matrix.lint }}

- name: Restore PLT cache
id: plt_cache
uses: actions/cache/restore@v4
with:
key: |
plt-${{ runner.os }}-${{ steps.beam.outputs.otp-version }}-${{ steps.beam.outputs.elixir-version }}-${{ hashFiles('**/mix.lock') }}
restore-keys: |
plt-${{ runner.os }}-${{ steps.beam.outputs.otp-version }}-${{ steps.beam.outputs.elixir-version }}-
path: |
priv/plts
Comment on lines +137 to +146
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issue (bug_risk): PLT cache keys reference steps.beam but there is no step with that id, so the cache will not work as intended

steps.beam.outputs.otp-version and steps.beam.outputs.elixir-version will be empty because the Setup Elixir/OTP step has no id: beam, so the cache key will be malformed and hurt cache effectiveness. Either add id: beam to the erlef/setup-beam step or switch the cache key to use matrix.otp and matrix.elixir instead.

if: ${{ matrix.lint }}

- name: Create PLTs
if: ${{ steps.plt_cache.outputs.cache-hit != 'true' && matrix.lint }}
run: mix dialyzer --plt

- name: Save PLT cache
id: plt_cache_save
uses: actions/cache/save@v4
if: ${{ steps.plt_cache.outputs.cache-hit != 'true' && matrix.lint }}
with:
key: |
plt-${{ runner.os }}-${{ steps.beam.outputs.otp-version }}-${{ steps.beam.outputs.elixir-version }}-${{ hashFiles('**/mix.lock') }}
path: |
priv/plts

- name: Dialyzer
run: mix dialyzer --format github --format dialyxir
if: ${{ matrix.lint }}

- name: Run tests
run: mix test --only ${{ matrix.typesense }}:true --only nls:true --trace

- name: Post test coverage to Coveralls
run: mix coveralls.github
if: ${{ matrix.lint && github.event_name == 'push' && github.ref == 'refs/heads/main' }}
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,15 @@

## major.minor.patch (yyyy.mm.dd)

## 1.2.0 ???

### Changed

### Deprecated

* Overrides (aka Curation Rules) no longer nested under Collections -> Curation Sets
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion (typo): Consider adding a verb to make this sentence grammatically complete.

For example: Overrides (aka Curation Rules) are no longer nested under Collections -> Curation Sets.

Suggested change
* Overrides (aka Curation Rules) no longer nested under Collections -> Curation Sets
* Overrides (aka Curation Rules) are no longer nested under Collections -> Curation Sets

* TODO https://typesense.org/docs/30.0/api/#deprecations-behavior-changes

Check notice on line 17 in CHANGELOG.md

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

CHANGELOG.md#L17

Bare URL used

## 1.1.0 (2026.04.06)

### Added
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Restful client for Typesense with adherence to Open API spec 3 (formerly Swagger
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/965dd3f8866d49c3b3e82edd0f6270cb)](https://app.codacy.com/gh/jaeyson/open_api_typesense/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade)
[![codescenene Average Code Health](https://codescene.io/projects/63240/status-badges/average-code-health)](https://codescene.io/projects/63240)

[![CI v30.0](https://github.com/jaeyson/open_api_typesense/actions/workflows/ci_v30.0.yml/badge.svg)](https://github.com/jaeyson/open_api_typesense/actions/workflows/ci_v30.0.yml)
[![CI v29.0](https://github.com/jaeyson/open_api_typesense/actions/workflows/ci_v29.0.yml/badge.svg)](https://github.com/jaeyson/open_api_typesense/actions/workflows/ci_v29.0.yml)
[![CI v28.0](https://github.com/jaeyson/open_api_typesense/actions/workflows/ci_v28.0.yml/badge.svg)](https://github.com/jaeyson/open_api_typesense/actions/workflows/ci_v28.0.yml)
[![CI v27.1](https://github.com/jaeyson/open_api_typesense/actions/workflows/ci_v27.1.yml/badge.svg)](https://github.com/jaeyson/open_api_typesense/actions/workflows/ci_v27.1.yml)
Expand All @@ -16,7 +17,7 @@ Restful client for Typesense with adherence to Open API spec 3 (formerly Swagger

[![Dependabot](https://img.shields.io/badge/Dependabot-enabled-green)](https://github.com/jaeyson/open_api_typesense/pulls/app%2Fdependabot)
[![Hex.pm](https://img.shields.io/hexpm/l/open_api_typesense)](https://hexdocs.pm/open_api_typesense/license.html)
[![Latest Typesense compatible](https://img.shields.io/badge/Latest%20Typesense%20compatible-v28.0-%230F35BC)](https://typesense.org/docs/28.0/api)
[![Latest Typesense compatible](https://img.shields.io/badge/Latest%20Typesense%20compatible-v30.0-%230F35BC)](https://typesense.org/docs/30.0/api)

**Note**: the only place where ai is used/integrated is in PR reviews. I am NOT interested in adding/integrating ai generated code in my codebase, as this little library can be fit in my mental model. ai has it’s own great use case, it’s just that I wanted to be hands-on with these projects.

Expand Down
Loading