Update Registry route coordination #367
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: CellScript CI | |
| on: | |
| pull_request: | |
| push: | |
| branches: | |
| - main | |
| - master | |
| - "nightly-*" | |
| tags: | |
| - "v*" | |
| workflow_dispatch: | |
| concurrency: | |
| group: cellscript-ci-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| test: | |
| name: Test | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 45 | |
| services: | |
| postgres: | |
| image: postgres:17-alpine | |
| env: | |
| POSTGRES_DB: cellscript_registry_test | |
| POSTGRES_USER: cellscript_test | |
| POSTGRES_PASSWORD: cellscript_test_password | |
| ports: | |
| - 5432:5432 | |
| options: >- | |
| --health-cmd "pg_isready -U cellscript_test -d cellscript_registry_test" | |
| --health-interval 5s | |
| --health-timeout 5s | |
| --health-retries 10 | |
| env: | |
| CARGO_INCREMENTAL: "0" | |
| CARGO_TARGET_DIR: /tmp/cellscript-ci-target | |
| CELLSCRIPT_BACKEND_SHAPE_REPORT: /tmp/cellscript-backend-shape/backend-shape-report.json | |
| CKB_SDK_RUST_REF: v5.1.0 | |
| REGISTRY_TEST_DATABASE_URL: postgresql://cellscript_test:cellscript_test_password@127.0.0.1:5432/cellscript_registry_test | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Check out ckb-sdk-rust path dependency | |
| run: | | |
| git clone --depth 1 --branch "$CKB_SDK_RUST_REF" \ | |
| https://github.com/nervosnetwork/ckb-sdk-rust.git \ | |
| "$GITHUB_WORKSPACE/../ckb-sdk-rust" | |
| git -C "$GITHUB_WORKSPACE/../ckb-sdk-rust" rev-parse --short HEAD | |
| - name: Install Rust toolchain | |
| run: | | |
| rustup toolchain install 1.97.1 --profile minimal --component rustfmt --component clippy --component llvm-tools-preview | |
| rustup target add --toolchain 1.97.1 riscv64imac-unknown-none-elf wasm32-unknown-unknown | |
| rustup default 1.97.1 | |
| rustc --version | |
| cargo --version | |
| - name: Install CI dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y ripgrep | |
| rg --version | |
| - name: Configure Git identity for local registry fixtures | |
| run: | | |
| git config --global user.name "CellScript CI" | |
| git config --global user.email "ci@cellscript.dev" | |
| - name: Cache Cargo dependencies | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cargo/git | |
| ~/.cargo/registry | |
| key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-cargo- | |
| - name: Run unified CI gate | |
| run: | | |
| mkdir -p "$(dirname "$CELLSCRIPT_BACKEND_SHAPE_REPORT")" | |
| printf '{"status":"not-generated","reason":"test suite did not reach backend shape report generation"}\n' > "$CELLSCRIPT_BACKEND_SHAPE_REPORT" | |
| ./scripts/cellscript_gate.sh ci | |
| - name: Upload backend shape report | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: cellscript-backend-shape-report | |
| if-no-files-found: error | |
| path: /tmp/cellscript-backend-shape/ | |
| - name: Upload syntax combination audit report | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: cellscript-syntax-combo-audit | |
| if-no-files-found: ignore | |
| path: target/syntax-combo-audit/ | |
| - name: Upload strict backend audit report | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: cellscript-strict-backend-audit | |
| if-no-files-found: ignore | |
| path: target/cellscript-strict-backend-audit/ |