Skip to content

feat(organization): 实现可扩展的信息整理行为 #284

feat(organization): 实现可扩展的信息整理行为

feat(organization): 实现可扩展的信息整理行为 #284

Workflow file for this run

name: Repository and artifact checks
on:
pull_request:
workflow_dispatch:
permissions:
checks: read
contents: read
pull-requests: read
concurrency:
group: repository-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
PDM_CHECK_UPDATE: "false"
jobs:
repository:
name: Hermetic repository contract
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5
with:
fetch-depth: 0
- name: Set up Python and PDM
uses: pdm-project/setup-pdm@973541a5febeafcfdadf8a51211435be6ecfd90f # v4.5
with:
python-version-file: .python-version
version: 2.28.0
cache: true
- name: Install locked dependencies
run: pdm install -G dev --frozen-lockfile
- name: Enforce release intent
env:
BASE_REVISION: >-
${{ github.event.pull_request.base.sha }}
RELEASE_PR: ${{ github.event.pull_request.head.ref == 'release/next' }}
run: bash scripts/automation/repository_check.sh release-intent
- name: Run repository contract
run: pdm run check
- name: Build and verify all first-party wheels
env:
SOURCE_DATE_EPOCH: "315532800"
run: bash scripts/automation/repository_check.sh extension-wheels
- name: Enforce append-only migration history
if: github.event_name == 'pull_request'
run: pdm run check:migration-history "origin/${{ github.base_ref }}"
- name: Run pre-commit contract
run: pdm run pre-commit run --all-files
artifact:
name: Portable peer database runtime
runs-on: ubuntu-latest
services:
postgres:
image: >-
pgvector/pgvector:pg17@sha256:d2ef61f42ef767baa5a1475393303cc235bcd92febd9d7014eddb48b41f3bad0
env:
POSTGRES_DB: inkcre
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
ports:
- 5432:5432
options: >-
--health-cmd "pg_isready -U postgres -d inkcre"
--health-interval 5s
--health-timeout 5s
--health-retries 12
env:
CORE_DATABASE_PASSWORD: ci-core-database-password-at-least-32-bytes
DATABASE_URL: >-
postgresql+psycopg://inkcre_core:ci-core-database-password-at-least-32-bytes@127.0.0.1:5432/inkcre
INKCRE_ENV_FILE: ""
JWT_SECRET: ci-development-jwt-secret-at-least-32-bytes
MIGRATION_DATABASE_URL: >-
postgresql+psycopg://postgres:postgres@127.0.0.1:5432/inkcre
OBSRV__LOGGING_BACKEND: none
POSTGREST_DATABASE_PASSWORD: ci-postgrest-database-password-at-least-32-bytes
POSTGREST_IMAGE_TAG: inkcre-postgrest:${{ github.sha }}
IMAGE_TAG: inkcre-core:${{ github.sha }}
steps:
- name: Checkout
uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5
- name: Build frozen artifact
env:
SOURCE_REVISION: ${{ github.sha }}
run: bash scripts/automation/runtime_contract.sh build
- name: Inspect artifact contents
run: bash scripts/automation/runtime_contract.sh inspect
- name: Initialize fresh database twice
run: bash scripts/automation/runtime_contract.sh initialize
- name: Verify migration, metadata, and machine readiness
run: bash scripts/automation/runtime_contract.sh readiness
- name: Start PostgREST and verify peer read/write contract
run: bash scripts/automation/runtime_contract.sh postgrest
- name: Verify deterministic reset twice
run: bash scripts/automation/runtime_contract.sh reset
- name: Start and probe web artifact
run: bash scripts/automation/runtime_contract.sh web
- name: Export neutral database schema evidence
env:
SOURCE_REVISION: ${{ github.sha }}
run: bash scripts/automation/runtime_contract.sh export
- name: Restore the exported contract into a fresh database
run: bash scripts/automation/runtime_contract.sh restore