Merge pull request #3 from tajo/cleanup #9
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: Cargo | |
on: | |
push: | |
branches: ["main"] | |
pull_request: | |
types: [opened, synchronize] | |
env: | |
RUST_LOG: debug | |
CARGO_INCREMENTAL: 0 | |
CI: "1" | |
jobs: | |
test: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest] | |
name: Test - ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
submodules: true | |
- name: Setup node | |
uses: actions/setup-node@v2 | |
with: | |
node-version: 16 | |
- name: Install Rust | |
uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
override: true | |
- uses: Swatinem/rust-cache@v2 | |
with: | |
shared-key: "cargo-test" | |
cache-on-failure: true | |
- name: Install rustfmt | |
run: rustup component add rustfmt | |
- name: Run cargo fmt --check | |
run: | | |
cargo fmt --all -- --check | |
- name: Run cargo test | |
run: | | |
cargo test --all --color always |