Skip to content

Tests

Tests #1381

Workflow file for this run

name: Tests
on:
merge_group:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
permissions: {}
env:
CARGO_TERM_COLOR: always
jobs:
build:
name: Execute unit and integration tests
runs-on: ubuntu-latest
permissions: {}
env:
RUSTC_WRAPPER: "sccache"
SCCACHE_GHA_ENABLED: "true"
steps:
- name: Set up shared compilation cache
uses: mozilla-actions/sccache-action@fc920bf0ec8de6ee65d409111f7ec508035751ba # v0.0.11
- name: Check out repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Install protocol buffers compiler
run: |
sudo apt-get install -y protobuf-compiler
protoc --version
- name: Install tippecanoe
run: |
sudo apt-get install -y tippecanoe
tippecanoe --version
- name: Install Rust LLVM tools preview
run: rustup component add llvm-tools-preview
- name: Install Rust coverage tool
uses: taiki-e/install-action@67729d5c413db75907f0ad1e39bb04b9c868ff60 # v2.85.7
with:
tool: cargo-llvm-cov
- name: Fetch Rust dependencies
run: cargo fetch --locked
- name: Check formatting
run: cargo fmt --check
- name: Build
run: cargo build --locked
- name: Run tests
run: |
cargo llvm-cov test --cobertura --locked --verbose --output-path cobertura.xml
- name: Look for common mistakes
run: cargo clippy --locked
- name: Upload test coverage to Coveralls
with:
fail-on-error: false # not critical when coveralls.io is down
uses: coverallsapp/github-action@8d6379e14d29928660c4ba802d8e85393440b329 # v2.3.8