Skip to content

ES8 (and OpenSearch) support #35

ES8 (and OpenSearch) support

ES8 (and OpenSearch) support #35

Workflow file for this run

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
name: Elixir CI
on:
push:
branches: ["master"]
pull_request:
branches: ["master"]
permissions:
contents: read
jobs:
build:
name: Build and test
runs-on: ubuntu-latest
strategy:
matrix:
include:
- elixir: "1.15"
otp: "25"
- elixir: "1.18"
otp: "27"
lint: true
steps:
- name: Configure sysctl limits
run: |
sudo swapoff -a
sudo sysctl -w vm.swappiness=1
sudo sysctl -w fs.file-max=262144
sudo sysctl -w vm.max_map_count=262144
- name: Runs Elasticsearch
uses: elastic/elastic-github-actions/elasticsearch@master
with:
stack-version: 7.17.16
security-enabled: false
# port: 9200
# - name: Runs Elasticsearch
# uses: elastic/elastic-github-actions/elasticsearch@master
# with:
# stack-version: 8.13.4
# security-enabled: false
# port: 9201
# container-name: es8
- 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@v3
with:
path: deps
key: ${{ runner.os }}-mix-${{ hashFiles('**/mix.lock') }}
restore-keys: ${{ runner.os }}-mix-
- name: Install dependencies
run: mix deps.get
- name: Compile
run: mix compile --warnings-as-errors
- name: Run tests
run: mix test
- name: checks that the mix.lock file has no unused deps
run: mix deps.unlock --check-unused
if: ${{ matrix.lint }}
- name: check if files are already formatted
run: mix format --check-formatted
if: ${{ matrix.lint }}