Skip to content

Commit

Permalink
Revert "chore(CI): maximize disk space (#906)"
Browse files Browse the repository at this point in the history
This reverts commit bffe493.
  • Loading branch information
chefsale authored Oct 31, 2024
1 parent bffe493 commit 36ecf91
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 66 deletions.
10 changes: 5 additions & 5 deletions .github/actions/style/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ runs:
shell: bash
run: |
echo "Checking for Markdown/MDX changes..."
if true || echo "$ALL_CHANGED_FILES" | grep -qE '\.mdx?$'; then
if echo "$ALL_CHANGED_FILES" | grep -qE '\.mdx?$'; then
if ! pnpm check:md; then
echo "Markdown or MDX files are not properly formatted."
exit 1 # Exit with a non-zero status code to indicate failure
Expand All @@ -28,10 +28,10 @@ runs:
shell: bash
run: |
echo "Checking for Rust code changes..."
if true || echo "$ALL_CHANGED_FILES" | grep -q '\.rs$'; then
if echo "$ALL_CHANGED_FILES" | grep -q '\.rs$'; then
echo "Running checks for the Rust code..."
# Install the nightly toolchain
# Install the nightly toolchain
rustup toolchain install nightly
# Install rustfmt for the nightly toolchain
Expand All @@ -54,7 +54,7 @@ runs:
ALL_CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }}
run: |
echo "Checking for changes in node-ui files"
if true || echo "$ALL_CHANGED_FILES" | grep -q '^node-ui/'; then
if echo "$ALL_CHANGED_FILES" | grep -q '^node-ui/'; then
echo "Running checks for the node-ui..."
cd node-ui
if ! pnpm prettier:check .; then
Expand All @@ -75,7 +75,7 @@ runs:
ALL_CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }}
run: |
echo "Checking for changes in calimero-sdk files"
if true || echo "$ALL_CHANGED_FILES" | grep -q '^packages/calimero-sdk/'; then
if echo "$ALL_CHANGED_FILES" | grep -q '^packages/calimero-sdk/'; then
echo "Running checks for the calimero-sdk files"
cd packages/calimero-sdk
if ! pnpm prettier:check .; then
Expand Down
45 changes: 0 additions & 45 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,84 +14,39 @@ jobs:
name: Project setup
runs-on: ubuntu-latest
steps:
- name: Maximize build space
uses: easimon/maximize-build-space@v10
with:
root-reserve-mb: 4096

- name: Checkout code
uses: actions/checkout@v4

- name: How're we looking?
run: |
df -h
# Install Node.js (version 20) and pnpm
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '20'

- name: How're we looking?
run: |
df -h
- name: Install pnpm
run: npm install -g pnpm

- name: How're we looking?
run: |
df -h
# Install and build node-ui
- name: Install node-ui dependencies with pnpm
run: pnpm install --prefix ./node-ui

- name: How're we looking?
run: |
df -h
- name: Build node-ui
run: pnpm --filter ./node-ui run build

- name: How're we looking?
run: |
df -h
- name: Setup rust toolchain
run: rustup toolchain install stable --profile minimal

- name: How're we looking?
run: |
df -h
- name: Setup rust cache
uses: Swatinem/rust-cache@v2

- name: How're we looking?
run: |
df -h
- name: Run code style checks
uses: ./.github/actions/style

- name: How're we looking?
run: |
df -h
- name: Build
run: cargo build --verbose

- name: How're we looking?
run: |
df -h

- name: Run tests
run: |
chmod +x $GITHUB_WORKSPACE/scripts/build-all-apps.sh
chmod +x $GITHUB_WORKSPACE/scripts/test.sh
$GITHUB_WORKSPACE/scripts/test.sh
- name: How're we looking?
run: |
df -h
27 changes: 11 additions & 16 deletions packages/calimero-sdk/src/subscriptions/subscriptions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,7 @@ export interface SubscriptionsClient {
disconnect(connectionId?: string): void;
subscribe(contextIds: string[], connectionId?: string): void;
unsubscribe(contextIds: string[], connectionId?: string): void;
addCallback(
callback: (event: NodeEvent) => void,
connectionId?: string,
): void;
addCallback(callback: (event: NodeEvent) => void, connectionId?: string): void;
removeCallback(
callback: (event: NodeEvent) => void,
connectionId?: string,
Expand All @@ -19,23 +16,21 @@ export type NodeEvent = ContextEvent;

export type ContextEvent = ContextEventPayload & {
contextId: ContextId;
};
}

type ContextEventPayload =
| {
type: 'StateMutation';
data: StateMutation;
}
| {
type: 'ExecutionEvent';
data: ExecutionEvent;
};
type ContextEventPayload = {
type: 'StateMutation',
data: StateMutation,
} | {
type: 'ExecutionEvent',
data: ExecutionEvent,
};

export interface StateMutation {
newRoot: string;
}

export interface ExecutionEvent {
kind: string;
data: any;
kind: string,
data: any,
}

0 comments on commit 36ecf91

Please sign in to comment.