Skip to content

Commit

Permalink
chore: update deps and run clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
hansl committed Aug 18, 2020
1 parent 348a70b commit 579ecce
Show file tree
Hide file tree
Showing 6 changed files with 130 additions and 22 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Lint

on: [pull_request]

jobs:
test:
name: Lint

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Cache Cargo registry
uses: actions/cache@v1
with:
path: ~/.cargo/registry
key: ${{ matrix.build }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ matrix.build }}-cargo-registry-
- name: Cache Cargo index
uses: actions/cache@v1
with:
path: ~/.cargo/git
key: ${{ matrix.build }}-cargo-index-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ matrix.build }}-cargo-index-
- name: Cache Cargo build
uses: actions/cache@v1
with:
path: target
key: ${{ matrix.build }}-target-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ matrix.build }}-target-
- name: Install Rust
run: |
rustup update ${{ matrix.rust }} --no-self-update
rustup component add clippy
rustup default ${{ matrix.rust }}
- name: Run Lint
run: cargo clippy --verbose --tests --benches -- -D clippy::all
env:
RUST_BACKTRACE: 1
20 changes: 0 additions & 20 deletions .github/workflows/rust.yml

This file was deleted.

52 changes: 52 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Tests

on: [pull_request]

jobs:
test:
name: Test

runs-on: ${{ matrix.os }}
strategy:
matrix:
build: [ linux-stable, macos-stable ]
include:
- build: linux-stable
os: ubuntu-latest
rust: stable
- build: macos-stable
os: macos-latest
rust: stable

steps:
- uses: actions/checkout@v2

- name: Cache Cargo registry
uses: actions/cache@v1
with:
path: ~/.cargo/registry
key: ${{ matrix.build }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ matrix.build }}-cargo-registry-
- name: Cache Cargo index
uses: actions/cache@v1
with:
path: ~/.cargo/git
key: ${{ matrix.build }}-cargo-index-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ matrix.build }}-cargo-index-
- name: Cache Cargo build
uses: actions/cache@v1
with:
path: target
key: ${{ matrix.build }}-target-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ matrix.build }}-target-
- name: Install Rust
run: |
rustup update ${{ matrix.rust }} --no-self-update
rustup default ${{ matrix.rust }}
- name: Run Tests
run: cargo test --all-features
env:
RUST_BACKTRACE: 1
34 changes: 34 additions & 0 deletions .mergify.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
pull_request_rules:
- name: Automatic merge
conditions:
- "#approved-reviews-by>=1"
- "#changes-requested-reviews-by=0"
- "-conflict"
- "-draft"
- status-success=conventional-pr-title
- "#status-success>=1"
- "#status-failure=0"
- base=master
- label=automerge-squash
actions:
merge:
method: squash
strict: smart
commit_message: title+body
delete_head_branch: {}

- name: Clean up automerge tags
conditions:
- closed
actions:
label:
remove:
- automerge-squash

- name: Auto-approve auto-PRs
conditions:
- author=dfinity-bot
actions:
review:
type: APPROVE
message: This bot trusts that bot
2 changes: 1 addition & 1 deletion ic-agent/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ serde_cbor = "0.10"
url = "2.1.0"

[dev-dependencies]
mockito = "0.20.0"
mockito = "0.27.0"
proptest = "0.9.5"
tokio = "0.2.6"
1 change: 0 additions & 1 deletion ic-agent/src/types/canister_id.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
use crate::types::blob::Blob;
use crc8::Crc8;
use hex;
use serde::{Deserialize, Deserializer, Serialize, Serializer};
use std::{fmt, str};

Expand Down

0 comments on commit 579ecce

Please sign in to comment.