Skip to content

chore(deps)(deps): bump serde_json from 1.0.149 to 1.0.151 #4

chore(deps)(deps): bump serde_json from 1.0.149 to 1.0.151

chore(deps)(deps): bump serde_json from 1.0.149 to 1.0.151 #4

Workflow file for this run

name: CI/CD Pipeline
on:
push:
branches: [main]
pull_request:
branches: [main]
env:
CARGO_TERM_COLOR: always
NODE_VERSION: '20'
jobs:
# ── Rust: Format ──────────────────────────────────────────────────────────
rust-fmt:
name: Rust Format Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
components: rustfmt
override: true
- name: Check formatting
run: cargo fmt --all -- --check
# ── Rust: Clippy ──────────────────────────────────────────────────────────
rust-clippy:
name: Rust Clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
components: clippy
override: true
- name: Run Clippy
run: cargo clippy --all-targets -- -D warnings
# ── Rust: Test ────────────────────────────────────────────────────────────
rust-test:
name: Rust Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: Cache cargo registry
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-
- name: Run tests
run: cargo test --all-features
# ── Rust: Gas Benchmarks ──────────────────────────────────────────────────
rust-gas-bench:
name: Gas Consumption Benchmarks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: Cache cargo registry
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-gas-${{ hashFiles('Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-gas-
- name: Run gas benchmarks
run: cargo test --release gas_benchmarks -- --nocapture
- name: Upload gas baseline artifact
uses: actions/upload-artifact@v4
with:
name: gas-baseline
path: gas-baseline.json
# ── Contract WASM Size Check ──────────────────────────────────────────────
wasm-size-check:
name: Contract WASM Size Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: wasm32-unknown-unknown
override: true
- name: Build contracts for WASM
run: cargo build --target wasm32-unknown-unknown --release
- name: Check WASM sizes (< 64KB per contract)
run: |
set -e
MAX_SIZE=65536
FAILED=0
for wasm in target/wasm32-unknown-unknown/release/*.wasm; do
[ -f "$wasm" ] || continue
size=$(stat -c%s "$wasm")
name=$(basename "$wasm")
if [ "$size" -gt "$MAX_SIZE" ]; then
echo "::error::WASM $name is $size bytes (max $MAX_SIZE)"
FAILED=1
else
echo "::notice::WASM $name is $size bytes (OK)"
fi
done
[ "$FAILED" -eq 0 ] || exit 1
# ── SDK: Lint ─────────────────────────────────────────────────────────────
sdk-lint:
name: SDK Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
- name: Install dependencies
run: npm ci
working-directory: .
- name: Run lint
run: npm run lint
working-directory: .
# ── SDK: Test ─────────────────────────────────────────────────────────────
sdk-test:
name: SDK Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
- name: Install dependencies
run: npm ci
working-directory: .
- name: Run tests
run: npm test
working-directory: .
# ── SDK: Build ────────────────────────────────────────────────────────────
sdk-build:
name: SDK Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
- name: Install dependencies
run: npm ci
working-directory: .
- name: Build SDK
run: npm run build
working-directory: .
# ── UI: Lint ──────────────────────────────────────────────────────────────
ui-lint:
name: UI Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
- name: Install UI dependencies
run: npm ci
working-directory: ui
- name: Run UI lint
run: npm run lint
working-directory: ui
# ── UI: Build ─────────────────────────────────────────────────────────────
ui-build:
name: UI Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
- name: Install UI dependencies
run: npm ci
working-directory: ui
- name: Build UI
run: npm run build
working-directory: ui
- name: Type check UI
run: npm run type-check
working-directory: ui
# ── Coverage ──────────────────────────────────────────────────────────────
coverage:
name: Code Coverage
runs-on: ubuntu-latest
needs: [rust-test, sdk-test]
if: github.event_name == 'pull_request' || (github.event_name == 'push' && github.ref == 'refs/heads/main')
steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: Install tarpaulin
uses: actions-rs/install@v0.1
with:
crate: cargo-tarpaulin
version: latest
use-tool-cache: true
- name: Run coverage
run: cargo tarpaulin --out Xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
file: ./cobertura.xml
fail_ci_if_error: false
# ── Notifications ─────────────────────────────────────────────────────────
notify:
name: Notify on Main Failure
runs-on: ubuntu-latest
needs:
- rust-fmt
- rust-clippy
- rust-test
- rust-gas-bench
- wasm-size-check
- sdk-lint
- sdk-test
- sdk-build
- ui-lint
- ui-build
if: failure() && github.ref == 'refs/heads/main'
steps:
- name: Slack Notification
uses: slackapi/slack-github-action@v1.27.0
with:
payload: |
{
"text": ":x: CI failed on `main` branch\nRepository: ${{ github.repository }}\nWorkflow: ${{ github.workflow }}\nActor: ${{ github.actor }}\nCommit: ${{ github.sha }}\nURL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
continue-on-error: true
- name: Discord Notification
uses: tsickert/discord-webhook@v6.0.0
with:
webhook-url: ${{ secrets.DISCORD_WEBHOOK_URL }}
content: ":x: **CI failed** on \`main\`\nRepository: ${{ github.repository }}\nWorkflow: ${{ github.workflow }}\nActor: ${{ github.actor }}\n[View Run](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})"

Check failure on line 299 in .github/workflows/ci.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/ci.yml

Invalid workflow file

You have an error in your yaml syntax on line 299
continue-on-error: true
# ── Final Gate ────────────────────────────────────────────────────────────
all-green:
name: All Checks Passed
runs-on: ubuntu-latest
needs:
- rust-fmt
- rust-clippy
- rust-test
- rust-gas-bench
- wasm-size-check
- sdk-lint
- sdk-test
- sdk-build
- ui-lint
- ui-build
if: always()
steps:
- name: Check all dependent jobs passed
run: |
RESULT="${{ contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') }}"
if [ "$RESULT" = "true" ]; then
echo "::error::Some required checks have failed"
exit 1
fi
echo "::notice::All checks passed!"