Skip to content

Merge pull request #3 from tembo-io/nhudson/add_logger_filter #14

Merge pull request #3 from tembo-io/nhudson/add_logger_filter

Merge pull request #3 from tembo-io/nhudson/add_logger_filter #14

name: tembo-telemetry ci workflow
defaults:
run:
shell: bash
on:
push:
branches:
- main
pull_request:
branches:
- main
env:
# Disable incremental compilation.
#
# Incremental compilation is useful as part of an edit-build-test-edit cycle,
# as it lets the compiler avoid recompiling code that hasn't changed. However,
# on CI, we're not making small edits; we're almost always building the entire
# project from scratch. Thus, incremental compilation on CI actually
# introduces *additional* overhead to support making future builds
# faster...but no future builds will ever occur in any given CI environment.
#
# See https://matklad.github.io/2021/09/04/fast-rust-builds.html#ci-workflow
# for details.
CARGO_INCREMENTAL: 0
# Allow more retries for network requests in cargo (downloading crates) and
# rustup (installing toolchains). This should help to reduce flaky CI failures
# from transient network timeouts or other issues.
CARGO_NET_RETRY: 10
RUSTUP_MAX_RETRIES: 10
# Don't emit giant backtraces in the CI logs.
RUST_BACKTRACE: short
jobs:
check:
name: cargo check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
- name: Check
run: cargo check --all --tests --benches
style:
name: cargo fmt
needs: check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: nightly
components: rustfmt
- name: rustfmt
run: cargo +nightly fmt --all -- --check
warnings:
# Check for any warnings. This is informational and thus is allowed to fail.
runs-on: ubuntu-latest
needs: check
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- name: Clippy
uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --all --examples --tests --benches -- -D warnings
tests:
name: Run tests
runs-on: ubuntu-22.04
needs: style
steps:
- uses: actions/checkout@v2
- name: Install Rust stable toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: run all tests
run: cargo test