update README and changelog #171
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: CI | |
on: | |
push: | |
branches: ["main"] | |
pull_request: | |
branches: ["main"] | |
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: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
typesense-version: ['0.25.2', '26.0'] | |
typesense-port: ['8108:8108'] | |
env: | |
MIX_ENV: test | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
services: | |
typesense: | |
image: typesense/typesense:${{ matrix.typesense-version }} | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v4 | |
- name: Start Typesense | |
run: | | |
docker run -d \ | |
-p ${{ matrix.typesense-port }} \ | |
--name typesense \ | |
-v /tmp/typesense-data:/data \ | |
typesense/typesense:${{ matrix.typesense-version}} \ | |
--api-key=xyz \ | |
--data-dir /data \ | |
--enable-cors | |
- name: Curl Typesense | |
run: sleep 1 && curl http://localhost:8108/health | |
- name: Setup Elixir/OTP | |
uses: erlef/setup-beam@v1 | |
with: | |
otp-version: '25' | |
elixir-version: '1.14.x' | |
- name: Cache dependencies/builds | |
uses: actions/cache@v4 | |
with: | |
path: | | |
deps | |
_build | |
key: ${{ runner.os }}-mix-typesense-${{ matrix.typesense-version }}-${{ hashFiles('**/mix.lock') }} | |
restore-keys: | | |
${{ runner.os }}-mix-typesense-${{ matrix.typesense-version }} | |
- 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 | |
- name: Check retired dependencies | |
run: mix hex.audit | |
- name: Security audit of dependencies | |
run: mix deps.audit | |
- name: Compile project | |
run: mix compile --all-warnings | |
- name: run static analysis | |
run: mix credo --all --strict | |
# - name: check format files | |
# run: mix format --check-formatted | |
- name: Run tests | |
run: mix test | |
- name: Post test coverage to Coveralls | |
run: mix coveralls.github |