update (#37) #97
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Check | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| env: | |
| EDGEE_API_TOKEN: ${{ secrets.EDGEE_API_TOKEN }} | |
| 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 | |
| - uses: edgee-cloud/install-edgee-cli@v0.2.0 | |
| - run: edgee component wit | |
| - 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.2.0 | |
| - run: edgee component wit | |
| - 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.2.0 | |
| - run: edgee component wit | |
| - 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.2.0 | |
| - run: edgee component build | |
| - name: Verify .wasm file exists | |
| run: | | |
| if [ ! -f "./segment.wasm" ]; then | |
| echo "❌ Error: segment.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 | |
| with: | |
| target: wasm32-wasip2 | |
| - uses: edgee-cloud/install-edgee-cli@v0.2.0 | |
| - run: edgee component wit | |
| - run: make test | |
| coverage: | |
| name: coverage & coveralls | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| target: wasm32-wasip2 | |
| - uses: taiki-e/install-action@cargo-llvm-cov | |
| - uses: edgee-cloud/install-edgee-cli@v0.2.0 | |
| - run: edgee component wit | |
| - run: make test.coverage.lcov | |
| - uses: coverallsapp/github-action@v2 |