From 1bcbe203e0719c58d30566b74d4e141915ce48bd Mon Sep 17 00:00:00 2001 From: Clement Bouvet Date: Tue, 18 Mar 2025 11:14:25 +0100 Subject: [PATCH 1/2] set wit-version to 1.0.0 --- edgee-component.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/edgee-component.toml b/edgee-component.toml index 9f39087..f6046a1 100644 --- a/edgee-component.toml +++ b/edgee-component.toml @@ -10,7 +10,7 @@ description = "Example Rust component for data collection" documentation = "https://github.com/edgee-cloud/example-rust-component" repository = "https://github.com/edgee-cloud/example-rust-component" language = "Rust" -wit-version = "0.5.0" +wit-version = "1.0.0" [component.build] command = "cargo build --target wasm32-wasip2 --release --target-dir ./target && mv ./target/wasm32-wasip2/release/example_rust_component.wasm ./dc_component.wasm" From d5131d2b73efbb138b7c728879235400e53be324 Mon Sep 17 00:00:00 2001 From: Clement Bouvet Date: Tue, 18 Mar 2025 11:31:06 +0100 Subject: [PATCH 2/2] update check --- .github/workflows/check.yml | 116 +++++++++++++++++------------------- 1 file changed, 55 insertions(+), 61 deletions(-) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 881c3b6..be83c94 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -1,65 +1,59 @@ name: Check on: - push: - branches: - - main - pull_request: + push: + branches: + - main + pull_request: jobs: - check: - name: cargo check - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: dtolnay/rust-toolchain@stable - with: - target: wasm32-wasip2 # WebAssembly target - components: rustfmt - - run: cargo check - fmt: - name: cargo fmt - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: dtolnay/rust-toolchain@stable - with: - components: rustfmt - - uses: actions-rust-lang/rustfmt@v1 - clippy: - name: clippy - runs-on: ubuntu-latest - permissions: - checks: write - steps: - - uses: actions/checkout@v4 - - uses: dtolnay/rust-toolchain@stable - with: - components: clippy - - uses: wearerequired/lint-action@master - with: - clippy: true - build: - name: cargo build - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: dtolnay/rust-toolchain@stable - with: - target: wasm32-wasip2 # WebAssembly target - - uses: edgee-cloud/install-edgee-cli@v0.1.0 - - run: edgee component build - - name: Verify .wasm file exists - run: | - if [ ! -f "./dc_component.wasm" ]; then - echo "❌ Error: dc_component.wasm not found" >&2 - exit 1 - fi - - test: - name: cargo test - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: dtolnay/rust-toolchain@stable - - uses: taiki-e/install-action@cargo-llvm-cov - - run: make test.coverage + check: + name: cargo check + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@stable + with: + target: wasm32-wasip2 # WebAssembly target + components: rustfmt + - uses: edgee-cloud/install-edgee-cli@v0.1.0 + - run: edgee component build + - run: cargo check + fmt: + name: cargo fmt + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@stable + with: + components: rustfmt + target: wasm32-wasip2 + - uses: edgee-cloud/install-edgee-cli@v0.1.0 + - run: edgee component build + - uses: actions-rust-lang/rustfmt@v1 + clippy: + name: clippy + runs-on: ubuntu-latest + permissions: + checks: write + steps: + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@stable + with: + components: clippy + target: wasm32-wasip2 + - uses: edgee-cloud/install-edgee-cli@v0.1.0 + - run: edgee component build + - uses: wearerequired/lint-action@master + with: + clippy: true + test: + name: cargo test + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@stable + with: + target: wasm32-wasip2 + - uses: edgee-cloud/install-edgee-cli@v0.1.0 + - run: edgee component build + - run: make test