name: Rust-CI

on:
  push:
    branches: [ master ]
  pull_request:
    branches: [ master ]
  workflow_dispatch:

env:
  CARGO_TERM_COLOR: always

jobs:
  build:

    runs-on: ubuntu-latest

    steps:
    - name: Checkout with submodules
      uses: actions/checkout@v2
      with:
          token: ${{ secrets.ACCESS_TOKEN }}
          submodules: recursive
    - name: update rust to nightly
      uses: dtolnay/rust-toolchain@nightly
    - name: Build
      run: cargo build --verbose
    - name: Run tests
      run: cargo test --verbose
