Skip to content

Code refactor to have less indent #9

Code refactor to have less indent

Code refactor to have less indent #9

Workflow file for this run

name: Test & Lint
on:
push:
branches: ["*"]
paths:
- ".github/workflows/test.yml"
- "**/*.rs"
- "**/*.md" # Test examples in markdowns included as API doc
- "**/Cargo.toml"
pull_request:
branches: ["*"]
paths:
- ".github/workflows/test.yml"
- "**/*.rs"
- "**/*.md" # Test examples in markdowns included as API doc
- "**/Cargo.toml"
env:
CARGO_TERM_COLOR: always
jobs:
test:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
rust: [stable, beta, nightly]
runs-on: ${{ matrix.os }}
timeout-minutes: 2
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust }}
override: true
- name: Build
run: cargo build --verbose
- name: Test
run: cargo test --verbose -- --show-output --include-ignored
lint:
runs-on: ubuntu-latest
timeout-minutes: 2
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
components: rustfmt, clippy
- uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --all-features
- name: Lint
run: cargo clippy --verbose -- -D warnings