Skip to content

examples in readme and example dir #156

examples in readme and example dir

examples in readme and example dir #156

Workflow file for this run

name: Rust
# run on push and pull request to main and release branches
on:
push:
branches:
- main
- release/*
pull_request:
branches:
- main
- release/*
env:
CARGO_TERM_COLOR: always
jobs:
lint:
name: Lint
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
with:
components: "clippy, rustfmt"
- uses: Swatinem/rust-cache@v2
# make sure all code has been formatted with rustfmt and linted with clippy
# - name: rustfmt
# run: cargo fmt -- --check --color always
# run clippy to verify we have no warnings
- run: cargo fetch
- name: cargo clippy
run: cargo clippy -p mqrstt
test:
name: Test
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- run: cargo fetch
- name: cargo test build
run: cargo build --tests --release
- name: cargo test
run: cargo test --release
deny-check:
name: cargo-deny
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: EmbarkStudios/cargo-deny-action@v2
coverage:
name: Coverage
runs-on: ubuntu-latest
permissions:
issues: write
steps:
- name: Checkout
uses: actions/checkout@v3
with:
persist-credentials: false
- name: Install toolchain
uses: dtolnay/rust-toolchain@nightly
- name: Install cargo-llvm-cov
run: |
curl -LsSf https://github.com/taiki-e/cargo-llvm-cov/releases/latest/download/cargo-llvm-cov-x86_64-unknown-linux-gnu.tar.gz \
| tar xzf - -C ~/.cargo/bin
- name: Generate coverage report
run: |
cargo llvm-cov clean --workspace
cargo llvm-cov test -p mqrstt --no-report --all-features
cargo llvm-cov report --lcov > lcov.txt
env:
RUSTFLAGS: --cfg __ui_tests
- name: Upload coverage report
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./lcov.txt