on:
  pull_request:
  push:
    branches:
      - master
  schedule:
    - cron: '00 01 * * *'

name: CI

env:
  CARGO_INCREMENTAL: 0

jobs:
  build-and-test:
    name: build
    runs-on: ubuntu-latest
    env:
      RUSTFLAGS: -D warnings
    steps:
      - uses: actions/checkout@v2
      - uses: actions-rs/toolchain@v1
        with:
          toolchain: stable
      - uses: actions-rs/cargo@v1
        with:
          command: build
          args: --all-targets --all-features
      - uses: actions-rs/cargo@v1
        with:
          command: test
      - uses: actions-rs/cargo@v1
        with:
          command: doc

  rustfmt:
    name: rustfmt
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: actions-rs/toolchain@v1
        with:
          profile: minimal
          toolchain: stable
          components: rustfmt
      - uses: actions-rs/cargo@v1
        with:
          command: fmt
          args: -- --check

  clippy:
    name: clippy
    runs-on: ubuntu-latest
    steps:
      - name: Install system dependencies
        run: sudo apt-get install libssl-dev
      - uses: actions/checkout@v2
      - uses: actions-rs/toolchain@v1
        with:
          profile: minimal
          toolchain: stable
          components: clippy
      - uses: actions-rs/cargo@v1
        with:
          command: clippy

on:
  pull_request:
  push:
    branches:
      - master
  schedule:
    - cron: '00 01 * * *'

name: CI

env:
  CARGO_INCREMENTAL: 0

jobs:
  build-and-test:
    name: build
    runs-on: ubuntu-latest
    env:
      RUSTFLAGS: -D warnings
    steps:
      - name: Install system dependencies
        run: sudo apt-get install libssl-dev
      - uses: actions/checkout@v2
      - uses: actions-rs/toolchain@v1
        with:
          toolchain: stable
      - uses: actions-rs/cargo@v1
        with:
          command: build
          args: --all-targets --all-features
      - uses: actions-rs/cargo@v1
        with:
          command: test
      - uses: actions-rs/cargo@v1
        with:
          command: doc

  rustfmt:
    name: rustfmt
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: actions-rs/toolchain@v1
        with:
          profile: minimal
          toolchain: stable
          components: rustfmt
      - uses: actions-rs/cargo@v1
        with:
          command: fmt
          args: -- --check

  clippy:
    name: clippy
    runs-on: ubuntu-latest
    steps:
      - name: Install system dependencies
        run: sudo apt-get install libssl-dev
      - uses: actions/checkout@v2
      - uses: actions-rs/toolchain@v1
        with:
          profile: minimal
          toolchain: stable
          components: clippy
      - uses: actions-rs/cargo@v1
        with:
          command: clippy

Install OpenSSL as well for builds and tests.
Install OpenSSL as well for builds and tests.
