From 6a88efec551a14b3779b5295ea47be7e7de65192 Mon Sep 17 00:00:00 2001 From: Aviv Palivoda Date: Sat, 25 Jan 2020 12:54:15 +0200 Subject: [PATCH] Add fmt and clippy to github actions --- .github/workflows/ci.yaml | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 933cc0e6e..b8d418952 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -4,11 +4,11 @@ name: CI jobs: rust_tests: - name: Run Rust tests + name: Run tests runs-on: ${{ matrix.os }} strategy: matrix: - os: ["macos-latest", "ubuntu-latest", "windows-latest"] + os: [macos-latest, ubuntu-latest, windows-latest] fail-fast: false steps: - uses: actions/checkout@master @@ -34,3 +34,25 @@ jobs: - name: run snippets run: pipenv run pytest working-directory: ./tests + + format: + name: Check Rust code with rustfmt and clippy + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@master + - uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable + components: rustfmt + override: true + - name: run rustfmt + uses: actions-rs/cargo@v1 + with: + command: fmt + args: --all -- --check + - name: run clippy + uses: actions-rs/cargo@v1 + with: + command: clippy + args: --all -- -Dwarnings \ No newline at end of file