Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

First version #1

Open
wants to merge 19 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @edgee-cloud/edgeers
73 changes: 73 additions & 0 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
name: Check
on:
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 "./kinesis.wasm" ]; then
echo "❌ Error: kinesis.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
- run: make test

coverage:
name: coverage & coveralls
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.lcov
- uses: coverallsapp/github-action@v2
28 changes: 28 additions & 0 deletions .github/workflows/wasm-build-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Build and Release WASM

permissions:
contents: write
on:
release:
types: [ published ]

jobs:
check:
name: Build and release wasm component
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
- name: Upload WASM to release
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./kinesis.wasm
asset_name: kinesis.wasm
asset_content_type: application/wasm
21 changes: 2 additions & 19 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,21 +1,4 @@
# Generated by Cargo
# will have compiled files and executables
debug/
target/

# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries
# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html
Cargo.lock

# These are backup files generated by rustfmt
**/*.rs.bk

# MSVC Windows builds of rustc generate these, which store debugging information
*.pdb

# RustRover
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/
kinesis.wasm
lcov.info
Loading