ci: switch to github actions
This commit is contained in:
parent
c2849d05fb
commit
c6f0c98d87
39
.github/workflows/rust.yml
vendored
Normal file
39
.github/workflows/rust.yml
vendored
Normal file
|
@ -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
|
23
.travis.yml
23
.travis.yml
|
@ -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
|
Loading…
Reference in a new issue