-
Notifications
You must be signed in to change notification settings - Fork 3
Add support for v30.1 #45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 1 commit
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,6 @@ | ||
| name: CI v29.0 | ||
|
|
||
| on: | ||
| workflow_call: | ||
| pull_request: | ||
| branches: ["main"] | ||
|
|
||
|
|
||
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 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,165 @@ | ||
| name: CI v30.1 | ||
|
|
||
| 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' }} | ||
|
sourcery-ai[bot] marked this conversation as resolved.
Outdated
|
||
| runs-on: ubuntu-latest | ||
| environment: review | ||
|
|
||
| env: | ||
| MIX_ENV: test | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| LATEST_TYPESENSE: '30.1' | ||
|
|
||
| strategy: | ||
| matrix: | ||
| include: | ||
| - typesense: '30.1' | ||
| otp: '25' | ||
| elixir: '1.14' | ||
| lint: false | ||
| - typesense: '30.1' | ||
| otp: '28' | ||
| elixir: '1.18' | ||
| lint: true | ||
|
|
||
| services: | ||
| typesense: | ||
| image: typesense/typesense:${{ matrix.typesense }} | ||
|
|
||
| steps: | ||
| - name: Checkout repo | ||
|
sourcery-ai[bot] marked this conversation as resolved.
Outdated
|
||
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd | ||
|
|
||
| - name: Check for misspellings | ||
| uses: codespell-project/actions-codespell@8f01853be192eb0f849a5c7d721450e7a467c579 | ||
|
|
||
| - 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@fc68ffb90438ef2936bbb3251622353b3dcb2f93 | ||
| with: | ||
| otp-version: ${{matrix.otp}} | ||
| elixir-version: ${{matrix.elixir}} | ||
|
|
||
| - name: Restore cache | ||
| id: cache_restore | ||
| uses: actions/cache/restore@668228422ae6a00e4ad889ee87cd7109ec5666a7 | ||
| if: ${{ matrix.lint }} | ||
| with: | ||
| path: | | ||
| deps | ||
| _build | ||
| priv/plts | ||
| 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: Create PLTs | ||
| if: ${{ steps.cache_restore.outputs.cache-hit != 'true' && matrix.lint }} | ||
| run: mix dialyzer --plt | ||
|
|
||
| - 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' }} | ||
|
|
||
| - name: Save cache | ||
| id: cache_save | ||
| uses: actions/cache/save@668228422ae6a00e4ad889ee87cd7109ec5666a7 | ||
| if: ${{ matrix.lint }} | ||
| with: | ||
| path: | | ||
| deps | ||
| _build | ||
| priv/plts | ||
| key: | | ||
|
sourcery-ai[bot] marked this conversation as resolved.
Outdated
|
||
| ${{ runner.os }}-${{ steps.beam.outputs.otp-version }}-${{ steps.beam.outputs.elixir-version }}-${{ hashFiles('**/mix.lock') }} | ||
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 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 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 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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.