Merge pull request #29 from Fluxie/topic/cargo-update #91
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
pull_request: | |
push: | |
branches: | |
- master | |
- ci | |
jobs: | |
test: | |
name: Tests | |
env: | |
RUST_BACKTRACE: 1 | |
TERM: xterm | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: | |
- ubuntu-latest | |
- windows-2019 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Install toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
profile: minimal | |
override: true | |
- name: Environment | |
run: | | |
cargo --version | |
rustc --version | |
- name: Build | |
run: cargo build | |
- name: Tests | |
shell: bash | |
run: | | |
cd test | |
./test_script.sh | |
style: | |
name: Fmt & Clippy | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Install toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: nightly | |
profile: minimal | |
override: true | |
components: rustfmt, clippy | |
- name: Environment | |
run: | | |
cargo --version | |
cargo fmt -- --version | |
cargo clippy -- --version | |
- name: Run rustfmt | |
run: | | |
cargo fmt --all -- --check | |
- name: Run clippy | |
run: | | |
cargo clippy --all -- -D warnings |