feat: Auto-infer connection aggregates from node type fields #73
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
| name: CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| env: | |
| MIX_ENV: test | |
| ELIXIR_VERSION: "1.19" | |
| OTP_VERSION: "28" | |
| jobs: | |
| test: | |
| name: Test (Elixir ${{ matrix.elixir }} / OTP ${{ matrix.otp }}) | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| elixir: ["1.15", "1.16", "1.17", "1.18", "1.19"] | |
| otp: ["25", "26", "27", "28"] | |
| exclude: | |
| # OTP 27 requires Elixir 1.17+ | |
| - elixir: "1.15" | |
| otp: "27" | |
| - elixir: "1.16" | |
| otp: "27" | |
| # OTP 28 requires Elixir 1.18+ | |
| - elixir: "1.15" | |
| otp: "28" | |
| - elixir: "1.16" | |
| otp: "28" | |
| - elixir: "1.17" | |
| otp: "28" | |
| # Elixir 1.19 requires OTP 26+ | |
| - elixir: "1.19" | |
| otp: "25" | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Elixir | |
| uses: erlef/setup-beam@v1 | |
| with: | |
| elixir-version: ${{ matrix.elixir }} | |
| otp-version: ${{ matrix.otp }} | |
| - name: Restore dependencies cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| deps | |
| _build | |
| key: ${{ runner.os }}-mix-${{ matrix.elixir }}-${{ matrix.otp }}-${{ hashFiles('**/mix.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-mix-${{ matrix.elixir }}-${{ matrix.otp }}- | |
| - name: Install dependencies | |
| run: mix deps.get | |
| - name: Compile project | |
| run: mix compile --warnings-as-errors | |
| - name: Run tests | |
| run: mix test | |
| example-tests: | |
| name: Example Tests | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Elixir | |
| uses: erlef/setup-beam@v1 | |
| with: | |
| elixir-version: ${{ env.ELIXIR_VERSION }} | |
| otp-version: ${{ env.OTP_VERSION }} | |
| - name: Restore dependencies cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| deps | |
| _build | |
| examples/social_network/deps | |
| examples/social_network/_build | |
| key: ${{ runner.os }}-example-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ hashFiles('**/mix.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-example-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}- | |
| - name: Install main library dependencies | |
| run: mix deps.get | |
| - name: Compile main library | |
| run: mix compile | |
| - name: Install social_network example dependencies | |
| working-directory: examples/social_network | |
| run: mix deps.get | |
| - name: Compile social_network example | |
| working-directory: examples/social_network | |
| run: mix compile --warnings-as-errors | |
| - name: Run social_network example tests | |
| working-directory: examples/social_network | |
| run: mix test | |
| lint: | |
| name: Lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Elixir | |
| uses: erlef/setup-beam@v1 | |
| with: | |
| elixir-version: ${{ env.ELIXIR_VERSION }} | |
| otp-version: ${{ env.OTP_VERSION }} | |
| - name: Restore dependencies cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| deps | |
| _build | |
| key: ${{ runner.os }}-mix-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ hashFiles('**/mix.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-mix-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}- | |
| - name: Install dependencies | |
| run: mix deps.get | |
| - name: Check formatting | |
| run: mix format --check-formatted | |
| - name: Run Credo | |
| run: mix credo --strict | |
| dialyzer: | |
| name: Dialyzer | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Elixir | |
| uses: erlef/setup-beam@v1 | |
| with: | |
| elixir-version: ${{ env.ELIXIR_VERSION }} | |
| otp-version: ${{ env.OTP_VERSION }} | |
| - name: Restore dependencies cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| deps | |
| _build | |
| key: ${{ runner.os }}-mix-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ hashFiles('**/mix.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-mix-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}- | |
| - name: Restore PLT cache | |
| id: plt_cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: priv/plts | |
| key: ${{ runner.os }}-plt-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ hashFiles('**/mix.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-plt-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}- | |
| - name: Install dependencies | |
| run: mix deps.get | |
| - name: Create PLTs directory | |
| run: mkdir -p priv/plts | |
| - name: Run Dialyzer | |
| run: mix dialyzer --format github | |
| docs: | |
| name: Documentation | |
| runs-on: ubuntu-latest | |
| env: | |
| MIX_ENV: dev | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Elixir | |
| uses: erlef/setup-beam@v1 | |
| with: | |
| elixir-version: ${{ env.ELIXIR_VERSION }} | |
| otp-version: ${{ env.OTP_VERSION }} | |
| - name: Restore dependencies cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| deps | |
| _build | |
| key: ${{ runner.os }}-mix-dev-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ hashFiles('**/mix.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-mix-dev-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}- | |
| - name: Install dependencies | |
| run: mix deps.get | |
| - name: Build documentation | |
| run: | | |
| # Capture warnings from ExDoc | |
| mix docs 2>&1 | tee doc_output.txt | |
| # Check for broken references in ExDoc output | |
| if grep -E "(module|function) .* not found" doc_output.txt; then | |
| echo "Found broken references in documentation" | |
| exit 1 | |
| fi | |
| # Also check the generated docs directory if it exists | |
| if [ -d "doc" ]; then | |
| if grep -r "module not found" doc/ 2>/dev/null; then | |
| echo "Found broken module references in documentation" | |
| exit 1 | |
| fi | |
| fi |