name: Rust

on:
  pull_request:
  push:

jobs:
  check:
    name: Check
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: ATiltedTree/setup-rust@v1
        with:
          rust-version: stable
      - run: cargo check

  test:
    name: Test
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: ATiltedTree/setup-rust@v1
        with:
          rust-version: stable
      - run: cargo test
  
  test_no_default_features:
    name: Test (no default features)
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: ATiltedTree/setup-rust@v1
        with:
          rust-version: stable
      - run: cargo test --no-default-features
