Skip to content

ACR CI/CD release pipeline for examples #17

ACR CI/CD release pipeline for examples

ACR CI/CD release pipeline for examples #17

Workflow file for this run

name: Build and test KVCounter
on:
pull_request:
branches: [main]
paths:
- "kvcounter/rust/**"
env:
working-directory: "./kvcounter"
jobs:
build_and_test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: wasmcloud/common-actions/install-wash@main
- name: Add wasm32-unknown-unknown
run: rustup target add wasm32-unknown-unknown
- name: Build actor
run: |
wash new actor --path rust kvcounter
wash build -p kvcounter
working-directory: ${{ env.working-directory }}
- name: Check formatting
run: cargo fmt -- --check
shell: bash
working-directory: ${{ env.working-directory }}/kvcounter
- name: Check lints with clippy
run: |
rustup component add clippy
cargo clippy
working-directory: ${{ env.working-directory }}/kvcounter
# Once you've written unit tests for your actor, you can uncomment
# the two lines below to automatically run tests
# - name: Test actor
# run: cargo test --target x86_64-unknown-linux-gnu -- --nocapture
# working-directory: ${{ env.working-directory }}