ES8 (and OpenSearch) support #43
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
| # 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" | |
| elasticsearch: "7.17.16" | |
| include_tags: "" | |
| - elixir: "1.18" | |
| otp: "27" | |
| lint: true | |
| elasticsearch: "7.17.16" | |
| include_tags: "" | |
| - elixir: "1.18" | |
| otp: "27" | |
| lint: true | |
| elasticsearch: "8.13.4" | |
| include_tags: "" | |
| 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: ${{matrix.elasticsearch}} | |
| security-enabled: false | |
| - 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 ${{matrix.include_tags}} | |
| - 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 }} |