Use actions-rs

This commit is contained in:
Cyryl Płotnicki 2019-09-23 13:00:10 +01:00
parent a20859597f
commit fce433553f

View file

@ -1,12 +1,60 @@
name: Test on: [push, pull_request]
on: [push]
name: Continuous integration
jobs: jobs:
build: check:
name: test name: Check
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@master - uses: actions/checkout@v1
- uses: cyplo/rust-action@master - uses: actions-rs/toolchain@v1
with: with:
args: "cargo fmt -- --check && cargo clippy -- -Dwarnings && cargo test" 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
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- run: rustup component add clippy
- uses: actions-rs/cargo@v1
with:
command: clippy
args: -- -D warnings