Skip to content

improvement: support operator overloads that rewrite to custom expres… #4774

improvement: support operator overloads that rewrite to custom expres…

improvement: support operator overloads that rewrite to custom expres… #4774

# SPDX-FileCopyrightText: 2019 ash contributors <https://github.com/ash-project/ash/graphs/contributors>
#
# SPDX-License-Identifier: MIT
name: Test Subprojects
on:
push:
tags:
- "v*"
branches: [main]
permissions:
contents: read
jobs:
test-subprojects:
runs-on: ubuntu-latest
name: Subproject ${{matrix.project.org}}/${{matrix.project.name}} - OTP ${{matrix.otp}} / Elixir ${{matrix.elixir}}
if: github.repository == 'ash-project/ash'
strategy:
fail-fast: false
matrix:
project: [
{
org: "ash-project",
name: "ash_postgres",
migrate: true,
migrate_tenants: true,
generate_migrations: true,
},
{ org: "ash-project", name: "ash_csv" },
{ org: "ash-project", name: "ash_double_entry", migrate: true },
{ org: "ash-project", name: "ash_money" },
{ org: "ash-project", name: "ash_graphql" },
{ org: "ash-project", name: "ash_json_api" },
{ org: "ash-project", name: "ash_phoenix" },
{ org: "ash-project", name: "ash_admin" },
{ org: "ash-project", name: "ash_archival", migrate: true },
{ org: "ash-project", name: "ash_state_machine" },
{ org: "ash-project", name: "ash_appsignal" },
{ org: "ash-project", name: "ash_oban", migrate: true },
{ org: "ash-project", name: "ash_typescript" },
{
org: "ash-project",
name: "ash_sqlite",
migrate: true,
generate_migrations: true
},
{ org: "ash-project", name: "ash_paper_trail" },
{ org: "team-alembic", name: "ash_authentication" },
{ org: "team-alembic", name: "ash_authentication_phoenix" },
# { org: "sevenseacat", name: "tunez", ref: "end-of-chapter-8" }
]
# todo: add 28 here when its available
otp: ["28.2"]
elixir: ["1.19.3"]
services:
pg:
image: postgres:16
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: postgres
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
ports: ["5432:5432"]
env:
ASH_CI: true
ASH_VERSION: local
# data layers should be tested against main of `ash_sql`
ASH_SQL_VERSION: main
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@fe104658747b27e96e4f7e80cd0a94068e53901d # v2.16.1
with:
egress-policy: audit
- run: sudo apt-get install --yes erlang-dev
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
repository: ${{matrix.project.org}}/${{matrix.project.name}}
path: ${{matrix.project.name}}
ref: ${{matrix.project.ref}}
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
repository: ash-project/ash
path: ash
- uses: erlef/setup-beam@fc68ffb90438ef2936bbb3251622353b3dcb2f93 # v1.24.0
with:
otp-version: ${{matrix.otp}}
elixir-version: ${{matrix.elixir}}
- uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
id: cache-deps
with:
path: ${{matrix.project.name}}/deps
key: ${{matrix.project.name}}-otp-${{matrix.otp}}-elixir-${{matrix.elixir}}-deps-2-${{ hashFiles('config/**/*.exs') }}-${{ hashFiles(format('{0}{1}', github.workspace, '/ash/mix.lock')) }}
restore-keys: ${{matrix.project.name}}-otp-${{matrix.otp}}-elixir-${{matrix.elixir}}-deps-2-${{ hashFiles('config/**/*.exs') }}-
- uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
id: cache-build
with:
path: ${{matrix.project.name}}/_build
key: ${{matrix.project.name}}-otp-${{matrix.otp}}-elixir-${{matrix.elixir}}-build-3-${{ hashFiles('config/**/*.exs') }}-${{ hashFiles(format('{0}{1}', github.workspace, '/ash/mix.lock')) }}
restore-keys: ${{matrix.project.name}}-otp-${{matrix.otp}}-elixir-${{matrix.elixir}}-build-3-${{ hashFiles('config/**/*.exs') }}-
- name: mix deps.get inside ./${{matrix.project.name}}
run: mix deps.get
working-directory: ./${{matrix.project.name}}
- run: mix test.create
if: ${{matrix.project.migrate}}
env:
MIX_ENV: test
working-directory: ./${{matrix.project.name}}
- run: mix test.migrate
if: ${{matrix.project.migrate}}
env:
MIX_ENV: test
working-directory: ./${{matrix.project.name}}
- run: mix test.migrate_tenants
env:
MIX_ENV: test
if: ${{matrix.project.migrate_tenants}}
working-directory: ./${{matrix.project.name}}
- name: mix compile --force --warnings-as-errors inside ./${{matrix.project.name}}
run: mix compile --force --warnings-as-errors
env:
MIX_ENV: test
working-directory: ./${{matrix.project.name}}
- name: mix test inside ./${{matrix.project.name}}
run: mix test
working-directory: ./${{matrix.project.name}}
- name: test.generate_migrations --check
run: mix test.generate_migrations --check
working-directory: ./${{matrix.project.name}}
if: ${{matrix.project.generate_migrations}}