53 lines
1.0 KiB
YAML
53 lines
1.0 KiB
YAML
|
# Based on https://github.com/actions-rs/meta/blob/master/recipes/msrv.md
|
||
|
|
||
|
on: [push, pull_request]
|
||
|
|
||
|
name: CI
|
||
|
|
||
|
jobs:
|
||
|
fmt:
|
||
|
name: Rustfmt
|
||
|
runs-on: ubuntu-latest
|
||
|
steps:
|
||
|
- name: Checkout sources
|
||
|
uses: actions/checkout@v2
|
||
|
|
||
|
- name: Install toolchain
|
||
|
uses: actions-rs/toolchain@v1
|
||
|
with:
|
||
|
toolchain: stable
|
||
|
override: true
|
||
|
|
||
|
- name: Install rustfmt
|
||
|
run: rustup component add rustfmt
|
||
|
|
||
|
- name: Run cargo fmt
|
||
|
uses: actions-rs/cargo@v1
|
||
|
with:
|
||
|
command: fmt
|
||
|
args: --all -- --check
|
||
|
|
||
|
test:
|
||
|
name: Test Suite
|
||
|
runs-on: ubuntu-latest
|
||
|
strategy:
|
||
|
matrix:
|
||
|
rust:
|
||
|
- stable
|
||
|
- beta
|
||
|
- nightly
|
||
|
steps:
|
||
|
- name: Checkout sources
|
||
|
uses: actions/checkout@v2
|
||
|
|
||
|
- name: Install toolchain
|
||
|
uses: actions-rs/toolchain@v1
|
||
|
with:
|
||
|
toolchain: ${{ matrix.rust }}
|
||
|
override: true
|
||
|
|
||
|
- name: Run cargo test
|
||
|
uses: actions-rs/cargo@v1
|
||
|
with:
|
||
|
command: test
|