Skip to content

Commit

Permalink
Merge pull request xaynetwork#68 from xainag/ci-build-all-features
Browse files Browse the repository at this point in the history
CI: add matrix to trigger Rust jobs with various `--features` flags
  • Loading branch information
little-dude committed Mar 21, 2020
2 parents 29a9aeb + a1e7f28 commit 1d52a9e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
14 changes: 10 additions & 4 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ jobs:
name: rust-build
runs-on: ubuntu-latest
strategy:
matrix:
features: [default, telemetry]
fail-fast: true
steps:
- uses: actions/checkout@master
Expand All @@ -21,12 +23,14 @@ jobs:
working-directory: ./rust
env:
RUSTFLAGS: "-D warnings"
run: cargo check
run: cargo check --features ${{ matrix.features }}

test:
name: rust-test
runs-on: ubuntu-latest
strategy:
matrix:
features: [default, telemetry]
fail-fast: true
steps:
- uses: actions/checkout@master
Expand All @@ -42,7 +46,7 @@ jobs:
uses: actions/setup-python@v1
with:
python-version: 3.6

- name: Install dependencies
run: |
python -m pip install --upgrade pip
Expand All @@ -54,12 +58,14 @@ jobs:
working-directory: ./rust
env:
RUSTFLAGS: "-D warnings"
run: cargo test
run: cargo test --features ${{ matrix.features }}

clippy:
name: rust-clippy
runs-on: ubuntu-latest
strategy:
matrix:
features: [default, telemetry]
fail-fast: true
steps:
- uses: actions/checkout@master
Expand All @@ -72,7 +78,7 @@ jobs:

- name: cargo clippy
working-directory: ./rust
run: cargo clippy -- -D warnings
run: cargo clippy --features ${{ matrix.features }} -- -D warnings

rustfmt:
name: rustfmt
Expand Down
2 changes: 1 addition & 1 deletion rust/src/common/logging.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ mod telemetry {
let fmt_subscriber = FmtSubscriber::builder()
.with_ansi(true)
.with_timer(ChronoUtc::rfc3339())
.with_max_level(settings.level)
.with_env_filter(settings.filter)
.finish();

if let Some(telemetry_settings) = settings.telemetry {
Expand Down

0 comments on commit 1d52a9e

Please sign in to comment.