diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml new file mode 100644 index 0000000..7679d25 --- /dev/null +++ b/.github/workflows/rust.yml @@ -0,0 +1,39 @@ +name: Rust + +on: + pull_request: + push: + branches: + - master + +jobs: + format: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v1 + + - name: Run rustfmt + run: cargo fmt -- --check + + test: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v1 + + - name: Install Rust toolchain + uses: actions-rs/toolchain@v1 + with: + toolchain: stable + profile: minimal + override: true + + - name: Cache target/ + uses: actions/cache@v1 + with: + path: target + key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }} + + - name: Run Test + run: cargo test --all-features diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index b459cf5..0000000 --- a/.travis.yml +++ /dev/null @@ -1,23 +0,0 @@ -language: rust - -rust: - - stable - - nightly - -matrix: - allow_failures: - - rust: nightly - -cache: cargo - -before_script: - - rustup component add rustfmt-preview - -script: - - cargo fmt --all -- --check - - cargo test --all-features - -notifications: - email: - on_failure: change - on_success: change