From 5df34762e64558c9c1042219ce1baee05777bf1d Mon Sep 17 00:00:00 2001 From: Jason Williams <936006+jasonwilliams@users.noreply.github.com> Date: Fri, 4 Oct 2019 17:35:49 -0400 Subject: [PATCH] fixing PR benchmarks (#132) * fixing PR benchmarks --- .github/workflows/pull_request.yml | 11 +++-- .github/workflows/rust.yml | 66 ++++++++++++++++++++++++++---- .travis.yml | 11 ----- 3 files changed, 64 insertions(+), 24 deletions(-) delete mode 100644 .travis.yml diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index e81c2996cb..093b4a5e28 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -1,12 +1,15 @@ on: [pull_request] -name: benchmark pull requests +name: Benchmarks jobs: runBenchmark: name: run benchmark runs-on: ubuntu-latest steps: - uses: actions/checkout@master - - name: run benchmark - uses: jasonwilliams/criterion-compare-action@comment_pr - env: + - uses: actions-rs/toolchain@v1 + with: + toolchain: stable + override: true + - uses: jasonwilliams/criterion-compare-action@move_to_actions + with: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 4568da6e06..bb2a4c1363 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -1,18 +1,66 @@ -name: Rust - on: + pull_request: + branches: + - master push: branches: - - master + - master + +name: Continuous integration jobs: - build: + check: + name: Check + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - uses: actions-rs/toolchain@v1 + with: + toolchain: stable + override: true + - uses: actions-rs/cargo@v1 + with: + command: check + test: + name: Test Suite runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - uses: actions-rs/toolchain@v1 + with: + toolchain: stable + override: true + - uses: actions-rs/cargo@v1 + with: + command: test + fmt: + name: Rustfmt + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - uses: actions-rs/toolchain@v1 + with: + 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: + toolchain: stable + override: true + - run: rustup component add clippy + - uses: actions-rs/cargo@v1 + with: + command: clippy + args: -- --verbose diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 698e969656..0000000000 --- a/.travis.yml +++ /dev/null @@ -1,11 +0,0 @@ -language: rust -rust: - - stable - - beta -cache: cargo -before_script: - - rustup component add rustfmt clippy -script: - - cargo fmt --verbose -- --check - - cargo clippy --verbose - - cargo test --verbose