name: CI testing
on: [push, pull_request_review]
jobs:
  build:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v1
    - name: Install dependencies
      run: sudo apt update && sudo apt install libsqlite3-dev
    - name: Install Rust nightly toolchain
      run: rustup default nightly
    - name: Build web interface
      run: cd web/ && npm install && npm run build
    - name: Build Rust project
      run: cd rust/ && cargo build
    - name: Build Rust doc
      run: cd rust/ && cargo doc --no-deps
    - name: Deploy documentation to GitHub Pages
      uses: crazy-max/ghaction-github-pages@v1
      with:
        target_branch: gh-pages
        build_dir: rust/target/doc/
      env:
        GITHUB_PAT: ${{ secrets.GITHUB_PAT }}
    - name: Check rust formatting
      run: cd rust/ && rustup component add rustfmt && cargo fmt -- --check
    - name: Run Rust tests
      run: cd rust/ && cargo test --no-fail-fast

name: CI testing
on: [push, pull_request_review]
jobs:
  build:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v1
    - name: Install dependencies
      run: sudo apt update && sudo apt install libsqlite3-dev
    - name: Install Rust nightly toolchain
      run: rustup default nightly
    - name: Build
      run: make
    - name: Build Rust doc
      run: cd rust/ && cargo doc --no-deps
    - name: Deploy documentation to GitHub Pages
      uses: crazy-max/ghaction-github-pages@v1
      with:
        target_branch: gh-pages
        build_dir: rust/target/doc/
      env:
        GITHUB_PAT: ${{ secrets.GITHUB_PAT }}
    - name: Check rust formatting
      run: cd rust/ && rustup component add rustfmt && cargo fmt -- --check
    - name: Run Rust tests
      run: cd rust/ && cargo test --no-fail-fast

Call `make` in GitHub build
Call `make` in GitHub build
