Skip to content

Commit

Permalink
Merge branch 'chore--add-commitizen' of github.com:calimero-network/c…
Browse files Browse the repository at this point in the history
…ore into chore--add-commitizen2
  • Loading branch information
MatejVukosav committed Dec 2, 2024
2 parents 546b8db + e58e5cd commit 57d17d2
Show file tree
Hide file tree
Showing 93 changed files with 4,597 additions and 2,517 deletions.
12 changes: 11 additions & 1 deletion .github/workflows/conventional_commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
push:
branches:
- "chore: add commitizen"
workflow_dispatch:

jobs:
validate-commit:
Expand All @@ -29,6 +30,15 @@ jobs:
echo "commit_message=$LAST_COMMIT" >> $GITHUB_ENV
- name: Validate commit message
run: commitlint --env-commit-message
run: |
echo "$commit_message"
if ! echo "$commit_message" | grep -Eq "^(feat|fix|chore|docs|style|refactor|perf|test)(\(.+\))?: .+"; then
echo "Invalid commit message format. Ensure it follows Conventional Commits."
exit 1
fi
env:
commit_message: ${{ env.commit_message }}

- name: Success message (Optional)
if: success()
run: echo "Commit message format is valid!"
44 changes: 44 additions & 0 deletions .github/workflows/cross-platform-install-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Test Install Script

on:
push:
branches:
- master

pull_request:
branches:
- master

jobs:
test-install:
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
arch: [x86_64, aarch64]

runs-on: ${{ matrix.os }}

steps:
- name: Checkout Code
uses: actions/checkout@v3

# Determine Branch Name
- name: Set Branch Name
id: branch-name
run: |
if [[ "${{ github.event_name }}" == "pull_request" ]]; then
echo "BRANCH_NAME=${{ github.head_ref }}" >> $GITHUB_ENV
else
echo "BRANCH_NAME=${{ github.ref_name }}" >> $GITHUB_ENV
fi
# Run the installation script
- name: Test installation script
run: |
curl -s https://raw.githubusercontent.com/calimero-network/core/${{ env.BRANCH_NAME }}/scripts/install.sh | bash
# Validate the binary installation
- name: Validate installation
run: |
which meroctl
meroctl --version
79 changes: 79 additions & 0 deletions .github/workflows/e2e_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
name: End-to-end tests

on:
push:
branches:
- '**'
paths:
- Cargo.toml
- Cargo.lock
- 'contracts/**'
- 'crates/**'
- 'e2e-tests/**'
- '.github/workflows/e2e_tests.yml'

jobs:
test:
name: Test
runs-on: ubuntu-latest

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

- name: Setup rust toolchain
run: rustup toolchain install stable --profile minimal

- name: Setup rust cache
uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true

- name: Build apps
run: |
./apps/kv-store/build.sh
- name: Build contracts
run: |
./contracts/context-config/build.sh
./contracts/proxy-lib/build.sh
- name: Build binaries
run: |
cargo build -p meroctl -p merod -p e2e-tests
- name: Run e2e tests
run: |
export NO_COLOR=1
echo "Running e2e tests, check job summary for details"
echo "# E2E tests 🏗️" >> $GITHUB_STEP_SUMMARY
./target/debug/e2e-tests \
--input-dir ./e2e-tests/config \
--output-dir ./e2e-tests/corpus \
--merod-binary ./target/debug/merod \
--meroctl-binary ./target/debug/meroctl \
--output-format markdown >> $GITHUB_STEP_SUMMARY
- name: Run e2e tests
if: success() || failure()
run: |
LOGS_DIR=./e2e-tests/corpus/logs
if [ ! -d "$LOGS_DIR" ]; then
echo "Directory $LOGS_DIR does not exist."
exit 1
fi
echo "# Node logs 📋" >> $GITHUB_STEP_SUMMARY
for FOLDER in "$LOGS_DIR"/*; do
if [ -d "$FOLDER" ]; then
RUN_LOG="$FOLDER/run.log"
if [ -f "$RUN_LOG" ]; then
echo "## Node logs: $(basename $FOLDER) 📋" >> $GITHUB_STEP_SUMMARY
cat "$RUN_LOG" >> $GITHUB_STEP_SUMMARY
else
echo "## No run.log found in $FOLDER ⚠️" >> $GITHUB_STEP_SUMMARY
fi
fi
done
83 changes: 56 additions & 27 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -306,3 +306,6 @@ multiple_crate_versions = "allow" # Cannot resolve all these
missing_errors_doc = "allow" # TODO: Remove later once documentation has been added
missing_panics_doc = "allow" # TODO: Remove later once documentation has been added
future_not_send = "allow" # TODO: Remove later once Send is implemented

[patch.crates-io]
starknet = { git = "https://github.com/xJonathanLEI/starknet-rs", rev = "5c676a6" }
3 changes: 2 additions & 1 deletion apps/gen-ext/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@ version = "0.1.0"
crate-type = ["cdylib"]

[dependencies]
calimero-sdk = {path = "../../crates/sdk"}
calimero-sdk = { path = "../../crates/sdk" }
calimero-sdk-near = { path = "../../crates/sdk/libs/near" }
calimero-storage = { path = "../../crates/storage" }
Loading

0 comments on commit 57d17d2

Please sign in to comment.