ci: switch to github actions
This commit is contained in:
parent
c2849d05fb
commit
c6f0c98d87
2 changed files with 39 additions and 23 deletions
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
|
||||
Loading…
Add table
Add a link
Reference in a new issue