Skip to content

Push metrics even on empty blocks #3520

Push metrics even on empty blocks

Push metrics even on empty blocks #3520

Workflow file for this run

name: Avail Light CI
on:
push:
branches:
- main
- develop
pull_request:
branches:
- main
- develop
workflow_dispatch:
jobs:
formatting:
name: cargo fmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
components: rustfmt
- name: Check Rust formatting
uses: actions-rust-lang/rustfmt@v1
- name: Check TOML, JSON, and MarkDown formatting
uses: dprint/[email protected]
clippy:
name: cargo clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
components: clippy
- run: cargo clippy --workspace -- -D warnings
test:
name: cargo test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: arduino/setup-protoc@v2
with:
repo-token: ${{ secrets.PAT_TOKEN }}
- uses: actions-rust-lang/setup-rust-toolchain@v1
- run: cargo test --workspace --benches --tests --no-default-features
env:
RUSTFLAGS: "-C instrument-coverage"
LLVM_PROFILE_FILE: "profile-%p-%m.profraw"
- uses: SierraSoftworks/setup-grcov@v1
name: Install grcov
with:
github-token: ${{ secrets.PAT_TOKEN }}
version: latest
- name: Generate test code coverage report
run: grcov . -s . --binary-path ./target/debug/ -t lcov --branch --ignore-not-existing -o lcov.info
- name: Upload test code coverage report to codecov.io
uses: codecov/codecov-action@v2
with:
files: lcov.info
- name: Cleanup
run: find . -name \*.profraw -type f -exec rm -f {} +
wasm:
name: web
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
target: wasm32-unknown-unknown
- run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
- run: wasm-pack build --target web --release
working-directory: web