name: Rust
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install rustfmt
run: rustup component add rustfmt
- name: Run rustfmt and check there's no difference
run: cargo fmt --all -- --check
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Build
run: cargo build
- name: Test unformatted logs
run: cargo test tests --verbose
- name: Test formatted logs
run: cargo test formatted_logs --verbose
- name: Test logs from unintialized threads
run: |
cargo test uninitialized_threads_should_panic
cargo test logging_from_uninitialized_threads_allowed