name: Test on stable and nightly
on:
pull_request:
types: [ opened, edited ]
paths:
- '**.rs'
- '**/Cargo.toml'
env:
CARGO_TERM_COLOR: always
jobs:
check-toolchains:
runs-on: ubuntu-latest
strategy:
matrix:
rust-toolchain: [stable, nightly]
steps:
- uses: actions/checkout@v2
- name: Install ${{ matrix.rust-toolchain }} toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust-toolchain }}
- name: Run cargo test
uses: actions-rs/cargo@v1
with:
toolchain: ${{ matrix.rust-toolchain }}
command: test
args: --all