-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
97 additions
and
2 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: ["**"] | ||
workflow_dispatch: | ||
inputs: | ||
|
||
jobs: | ||
check: | ||
runs-on: ubuntu-latest | ||
env: | ||
MIX_ENV: test | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Erlang OTP/Elixir | ||
uses: erlef/setup-beam@v1 | ||
with: | ||
otp-version: 26.2.5 | ||
elixir-version: 1.16.2-otp-26 | ||
|
||
- name: Cache dependencies restore | ||
id: cache-dependencies-restore | ||
uses: actions/cache/restore@v4 | ||
with: | ||
path: | | ||
_build | ||
deps | ||
key: test-deps-${{ hashFiles('mix.lock') }} | ||
|
||
- name: Install dependencies | ||
if: steps.cache-dependencies-restore.outputs.cache-hit != 'true' | ||
run: | | ||
mix deps.get | ||
mix deps.compile | ||
- name: Cache dependencies save | ||
if: steps.cache-dependencies-restore.outputs.cache-hit != 'true' | ||
uses: actions/cache/save@v4 | ||
with: | ||
path: | | ||
_build | ||
deps | ||
key: ${{ steps.cache-dependencies-restore.outputs.cache-primary-key }} | ||
|
||
- name: Compile | ||
run: mix compile --all-warnings --warnings-as-errors | ||
|
||
- name: Check format | ||
run: mix format --check-formatted | ||
|
||
- name: Check credo | ||
run: mix credo --all | ||
|
||
- name: Cache plt restore | ||
id: cache-plt-restore | ||
uses: actions/cache/restore@v4 | ||
with: | ||
path: | | ||
_build/*/*.plt | ||
_build/*/*.plt.hash | ||
key: test-plt-${{ hashFiles('mix.lock') }} | ||
|
||
- name: Create plt | ||
if: steps.cache-plt-restore.outputs.cache-hit != 'true' | ||
run: mix dialyzer --plt | ||
|
||
- name: Cache plt save | ||
if: steps.cache-plt-restore.outputs.cache-hit != 'true' | ||
uses: actions/cache/save@v4 | ||
with: | ||
path: | | ||
_build/*/*.plt | ||
_build/*/*.plt.hash | ||
key: ${{ steps.cache-plt-restore.outputs.cache-primary-key }} | ||
|
||
- name: Check dialyzer | ||
run: mix dialyzer --format github | ||
|
||
- name: Check test | ||
run: mix test --all-warnings --warnings-as-errors |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
defmodule AbsintheOneOf do | ||
@moduledoc false | ||
end |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
defmodule AbsintheOneOf.Directive do | ||
@moduledoc false | ||
|
||
use Absinthe.Schema.Prototype | ||
|
||
directive :one_of do | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
defmodule AbsintheOneOf.Phase do | ||
@moduledoc false | ||
|
||
@behaviour Absinthe.Phase | ||
|
||
@impl true | ||
|
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
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