Skip to content
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

Check absinthe dependent libraries on CI runs #1322

Merged
merged 1 commit into from
Jun 14, 2024
Merged
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
52 changes: 52 additions & 0 deletions .github/workflows/check_dependents.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Check Dependents

on:
push:
pull_request:
branches:
- master

jobs:
test_dependents:
name: Ensure ${{ matrix.dependent }} tests pass
runs-on: ubuntu-24.04

strategy:
matrix:
dependent:
- 'absinthe_plug'
- 'absinthe_phoenix'
- 'absinthe_relay'

steps:
- name: Set up Elixir
uses: erlef/setup-beam@v1
with:
elixir-version: '1.17'
otp-version: '27'

- name: Checkout absinthe
uses: actions/checkout@v4

- name: Checkout ${{ matrix.dependent }}
uses: actions/checkout@v4
with:
repository: 'absinthe-graphql/${{ matrix.dependent }}'
path: '${{ matrix.dependent }}'

- name: Install absinthe package dependencies
run: mix deps.get

- name: Update absinthe dependency
run: 'sed -i -e "s|{:absinthe,.*|{:absinthe, path: \"$GITHUB_WORKSPACE\", override: true},|" mix.exs'
working-directory: ./${{ matrix.dependent }}

- name: Install ${{ matrix.dependent }} package dependencies
run: mix deps.get
working-directory: ./${{ matrix.dependent }}

- name: Run unit tests
run: |
mix clean
mix test
working-directory: ./${{ matrix.dependent }}
36 changes: 16 additions & 20 deletions .github/workflows/elixir.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,27 +9,25 @@ on:
jobs:
test:
name: Elixir ${{matrix.elixir}} / OTP ${{matrix.otp}}
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04

strategy:
matrix:
elixir:
- "1.13"
- "1.14"
- "1.15"
- '1.15'
- '1.16'
- '1.17'
otp:
- "24"
- "25"
- "26"
include:
- elixir: "1.15"
otp: "26"
format: true
- '25'
- '26'
- '27'
exclude:
- otp: 26
elixir: 1.13
- otp: 26
elixir: 1.14
- otp: 25
elixir: 1.17
- otp: 27
elixir: 1.15
- otp: 27
elixir: 1.16

steps:
- name: Checkout
Expand Down Expand Up @@ -57,7 +55,6 @@ jobs:

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

- name: Run unit tests
run: |
Expand All @@ -77,10 +74,9 @@ jobs:
path: |
priv/plts
key: "v1-${{ runner.os }}-\
erlang-${{ matrix.otp }}-\
elixir-${{ matrix.elixir }}-\
${{ hashFiles('mix.lock') }}"
erlang-${{ matrix.otp }}-\
elixir-${{ matrix.elixir }}-\
${{ hashFiles('mix.lock') }}"

- name: Run Dialyzer
run: mix dialyzer

2 changes: 1 addition & 1 deletion lib/absinthe/utils/suggestion.ex
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
defmodule Absinthe.Utils.Suggestion do
@jaro_threshold 0.70
@jaro_threshold 0.68

@doc """
Sort a list of suggestions by Jaro distance to a target string,
Expand Down
3 changes: 0 additions & 3 deletions lib/mix/tasks/absinthe.schema.json.ex
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,6 @@ defmodule Mix.Tasks.Absinthe.Schema.Json do
with {:ok, result} <- Absinthe.Schema.introspect(schema) do
content = json_codec.encode!(result, pretty: pretty)
{:ok, content}
else
{:error, reason} -> {:error, reason}
error -> {:error, error}
end
end

Expand Down
Loading