From 775c36bb6557bc0481721fb46bb1da229fe97a6c Mon Sep 17 00:00:00 2001 From: Simon Laux Date: Tue, 10 Dec 2019 23:26:42 +0100 Subject: [PATCH] wip move some ci tasks to gh-actions (#998) * add-action-rs-clippy-action just to try this action out * add --all argument * rm --all argument again * add cargo check and fmt * disable circle ci counterparts(fetch, clippy, fmt) --- .circleci/config.yml | 14 ++++----- .github/workflows/code-quality.yml | 47 ++++++++++++++++++++++++++++++ 2 files changed, 54 insertions(+), 7 deletions(-) create mode 100644 .github/workflows/code-quality.yml diff --git a/.circleci/config.yml b/.circleci/config.yml index 7b02209b8..bd44ab540 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -187,7 +187,7 @@ workflows: test: jobs: - - cargo_fetch + # - cargo_fetch - remote_tests_rust @@ -197,12 +197,12 @@ workflows: # requires: # - build_test_docs_wheel # - build_doxygen - - rustfmt: - requires: - - cargo_fetch - - clippy: - requires: - - cargo_fetch + # - rustfmt: + # requires: + # - cargo_fetch + # - clippy: + # requires: + # - cargo_fetch - build_doxygen diff --git a/.github/workflows/code-quality.yml b/.github/workflows/code-quality.yml new file mode 100644 index 000000000..b5ec24d6f --- /dev/null +++ b/.github/workflows/code-quality.yml @@ -0,0 +1,47 @@ +on: push +name: Code Quality +jobs: + + check: + name: Check + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: nightly-2019-11-06 + override: true + - uses: actions-rs/cargo@v1 + with: + command: check + + fmt: + name: Rustfmt + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: nightly-2019-11-06 + override: true + - run: rustup component add rustfmt + - uses: actions-rs/cargo@v1 + with: + command: fmt + args: --all -- --check + + run_clippy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - uses: actions-rs/toolchain@v1 + with: + toolchain: nightly-2019-11-06 + components: clippy + override: true + - uses: actions-rs/clippy-check@v1 + with: + token: ${{ secrets.GITHUB_TOKEN }} + args: --all-features \ No newline at end of file