name: Rust

on: [push]

jobs:
  build:

    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v1
    - name: Build
      run: cargo build
    - name: Run tests
      run: cargo test

name: Rust

on: [push, pull_request]

jobs:
  build:

    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v1
    - name: Build
      run: cargo build
    - name: Run tests
      run: cargo test --features encoding,serialize

Test on PR and with all features enabled
Test on PR and with all features enabled