Repository navigation
134 lines (120 loc) · 4.14 KB
/
Copy pathci.yml
File metadata and controls
134 lines (120 loc) · 4.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
name: CellScript CI
on:
pull_request:
push:
branches:
- main
- master
- "0.30"
- "0.31"
- "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"
WRANGLER_HIDE_BANNER: "true"
WRANGLER_SEND_METRICS: "false"
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: Install Node.js
uses: actions/setup-node@v4
with:
node-version: "22"
cache: npm
cache-dependency-path: |
website/package-lock.json
services/registry-api/package-lock.json
- 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 cost corpus report
if: always()
uses: actions/upload-artifact@v4
with:
name: cellscript-cost-corpus-report
if-no-files-found: error
path: target/cellscript-cost/*.json
- 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/