name: ci

on: [pull_request, push]

jobs:
  build:
    runs-on: macos-latest

    strategy:
      matrix:
        # Temporarily pinning to a specific nightly until
        # https://github.com/rust-lang/rust/issues/71612
        # Afterwards this can be:
        # channel: [stable, nightly]
        channel: [stable, nightly-2020-04-26]

    steps:
    - uses: actions/checkout@v1

    - uses: actions-rs/cargo@v1

    - name: Select Rust channel
      uses: actions-rs/toolchain@v1
      with:
          toolchain: ${{ matrix.channel }}
          override: true

    - name: Rust Version Info
      run: rustc --version && cargo --version

    - name: Cache cargo registry
      uses: actions/cache@v1
      with:
        path: ~/.cargo/registry
        key: ${{ runner.os }}-${{ matrix.channel }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}

    - name: Cache cargo index
      uses: actions/cache@v1
      with:
        path: ~/.cargo/git
        key: ${{ runner.os }}-${{ matrix.channel }}-cargo-index-${{ hashFiles('**/Cargo.lock') }}

    - name: Cache cargo build
      uses: actions/cache@v1
      with:
        path: target
        key: ${{ runner.os }}-${{ matrix.channel }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}

    - name: cargo check
      run: cargo check --all-features

    - name: Run all tests
      run: cargo test --all

name: ci

on: [pull_request, push]

jobs:
  build:
    runs-on: macos-latest

    strategy:
      matrix:
        channel: [stable, nightly]

    steps:
    - uses: actions/checkout@v1

    - uses: actions-rs/cargo@v1

    - name: Select Rust channel
      uses: actions-rs/toolchain@v1
      with:
          toolchain: ${{ matrix.channel }}
          override: true

    - name: Rust Version Info
      run: rustc --version && cargo --version

    - name: Cache cargo registry
      uses: actions/cache@v1
      with:
        path: ~/.cargo/registry
        key: ${{ runner.os }}-${{ matrix.channel }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}

    - name: Cache cargo index
      uses: actions/cache@v1
      with:
        path: ~/.cargo/git
        key: ${{ runner.os }}-${{ matrix.channel }}-cargo-index-${{ hashFiles('**/Cargo.lock') }}

    - name: Cache cargo build
      uses: actions/cache@v1
      with:
        path: target
        key: ${{ runner.os }}-${{ matrix.channel }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}

    - name: cargo check
      run: cargo check --all-features

    - name: Run all tests
      run: cargo test --all

Use regular nightly on CI
Use regular nightly on CI
