Test 2 #9
This file contains 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: Test coverage | |
on: | |
push: | |
branches: [develop, staging] | |
paths: | |
- ".cargo/config.toml" | |
- ".github/workflows/coverage.yml" | |
- ".github/actions/**" | |
- "coverage.sh" | |
- "**.rs" # Include all rust files | |
- "**Cargo.toml" # Include all Cargo.toml files | |
- "**Cargo.lock" # Include all Cargo.lock files | |
- "!**/bindings/**" # Exclude all bindings | |
- "!cli/**" # Exclude CLI | |
workflow_dispatch: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
collect-coverage: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install Protoc | |
uses: arduino/setup-protoc@v1 | |
with: | |
repo-token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Set up Rust | |
uses: ./.github/actions/setup-rust | |
with: | |
toolchain: nightly | |
components: llvm-tools-preview | |
- name: Install required packages (Ubuntu) | |
run: | | |
sudo apt-get update | |
sudo apt-get install libudev-dev libusb-1.0-0-dev | |
- name: Install llvm-cov | |
uses: taiki-e/install-action@cargo-llvm-cov | |
- name: Install nextest | |
uses: taiki-e/install-action@nextest | |
- name: Start Sandbox | |
uses: 'iotaledger/iota-sandbox/.github/actions/setup@add-action' | |
with: | |
branch: add-action | |
- name: Start ledger nano | |
uses: "./.github/actions/ledger-nano" | |
- name: Collect coverage data | |
run: cargo ci-coverage | |
- name: Tear down Sandbox | |
if: always() | |
uses: 'iotaledger/iota-sandbox/.github/actions/tear-down@add-action' | |
with: | |
branch: add-action | |
- name: Upload coverage data to Coveralls | |
uses: coverallsapp/[email protected] | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
flag-name: Unit |