From 1c50469cdeb22450978ec06257326723745e8e15 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=CA=87=CA=9E=CA=8Cp?= Date: Mon, 30 Dec 2019 20:40:34 -0800 Subject: [PATCH] jazz up github action --- .github/workflows/rust.yml | 84 ++++++++++++++++++++++++++++++-------- 1 file changed, 68 insertions(+), 16 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 906fa33..c4edcac 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -1,26 +1,78 @@ -name: Rust +on: [push, pull_request] -on: [push] +name: ci jobs: - build-x86_64: + build_macos: + name: tests + runs-on: macos-latest + steps: + - uses: actions/checkout@v1 + - uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable + override: true + - uses: actions-rs/cargo@v1 + with: + command: test + check: + name: check runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v1 - - name: Build - run: cargo build --verbose - - name: Run tests - run: cargo test --verbose + - uses: actions/checkout@v1 + - uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable + override: true + - uses: actions-rs/cargo@v1 + with: + command: check - build-macos: + test: + name: tests + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable + override: true + - uses: actions-rs/cargo@v1 + with: + command: test - runs-on: macos-latest + fmt: + name: rust-fmt + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable + override: true + - run: rustup component add rustfmt + - uses: actions-rs/cargo@v1 + with: + command: fmt + args: --all -- --check + clippy: + name: clippy + runs-on: ubuntu-latest steps: - - uses: actions/checkout@v1 - - name: Build - run: cargo build --verbose - - name: Run tests - run: cargo test --verbose + - uses: actions/checkout@v1 + - uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable + override: true + - run: rustup component add clippy + - uses: actions-rs/cargo@v1 + with: + command: clippy + args: -- -D warnings