Skip to content

Release v0.5.4

Release v0.5.4 #307

Workflow file for this run

name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main
permissions:
pull-requests: write
jobs:
unit_tests:
name: Unit tests Elixir ${{matrix.elixir}} / OTP ${{matrix.otp}}
runs-on: ubuntu-20.04
strategy:
matrix:
include:
- elixir: "1.14"
otp: "25"
- elixir: "1.12"
otp: "23"
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Elixir
uses: erlef/setup-elixir@v1
with:
elixir-version: ${{ matrix.elixir }}
otp-version: ${{ matrix.otp }}
- name: Restore deps cache
uses: actions/cache@v3
with:
path: deps
key: ${{ runner.os }}-mix-${{ matrix.otp }}-${{ matrix.elixir }}-${{ hashFiles('**/mix.lock') }}
- name: Restore _build cache
uses: actions/cache@v3
with:
path: _build
key: ${{ runner.os }}-build-${{ matrix.otp }}-${{ matrix.elixir }}-${{ hashFiles('**/mix.lock') }}
- name: Restore plt cache
if: ${{ matrix.otp == '25' && matrix.elixir == '1.14' }}
uses: actions/cache@v3
with:
path: priv/plts
key: ${{ runner.os }}-build-${{ matrix.otp }}-${{ matrix.elixir }}-${{ hashFiles('**/mix.lock') }}
- name: Install deps
run: mix deps.get
- name: Check Formatting
run: mix format --check-formatted
- name: Run unit tests
run: |
mix clean
mix test
- name: Run unit tests with persistent_term backend
run: |
mix clean
mix test
env:
SCHEMA_PROVIDER: persistent_term
- name: Run dialyzer
if: ${{ matrix.otp == '25' && matrix.elixir == '1.14' }}
run: |
mkdir -p priv/plts/{local,core}
MIX_ENV=test mix dialyzer
federation_compatibility_tests:
name: Federation compatibility tests
runs-on: ubuntu-20.04
strategy:
matrix:
include:
- elixir: "1.14"
otp: "25"
steps:
- name: Save action secrets
id: actionsecrets
shell: bash
run: |
if [ $IS_FORK != "true" ]; then
echo "github_token=$GITHUB_TOKEN" >> $GITHUB_OUTPUT
fi
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
IS_FORK: ${{ github.event.pull_request.head.repo.full_name != github.repository }}
- name: Checkout
uses: actions/checkout@v3
- name: Set up Elixir
uses: erlef/setup-elixir@v1
with:
elixir-version: ${{ matrix.elixir }}
otp-version: ${{ matrix.otp }}
- name: Restore deps cache
uses: actions/cache@v3
with:
path: deps
key: ${{ runner.os }}-mix-${{ matrix.otp }}-${{ matrix.elixir }}-${{ hashFiles('**/mix.lock') }}
- name: Restore _build cache
uses: actions/cache@v3
with:
path: _build
key: ${{ runner.os }}-build-${{ matrix.otp }}-${{ matrix.elixir }}-${{ hashFiles('**/mix.lock') }}
- name: Print federation compatibility schema
run: |
mix deps.get
mix absinthe.federation.schema.sdl --schema ProductsWeb.Schema --out schema.graphql
working-directory: ./federation_compatibility
- name: Test subgraph compatibility
uses: apollographql/federation-subgraph-compatibility@v1
with:
compose: "federation_compatibility_docker_compose.yml"
schema: "federation_compatibility/schema.graphql"
token: ${{ steps.actionsecrets.outputs.github_token }}
port: 4001
failOnWarning: true
failOnRequired: true