name: Rust

on:
  push:
    branches:
      - master
  pull_request: {}

jobs:
  check-format:
    runs-on: ubuntu-18.04
    steps:
    - uses: actions/checkout@v1
    - uses: actions-rs/cargo@v1
      with:
        command: fmt
        args: -- --check

  clippy:
    runs-on: ubuntu-18.04
    steps:
    - uses: actions/checkout@v1
    - uses: actions-rs/cargo@v1
      with:
        command: clippy

  coverage:
    runs-on: ubuntu-18.04
    container:
      image: rustmath/mkl-rust:1.43.0
      options: --security-opt seccomp=unconfined
    steps:
      - uses: actions/checkout@v2
      - name: Generate code coverage
        run: |
          cargo tarpaulin --verbose --features=intel-mkl --out Xml --manifest-path=ndarray-linalg/Cargo.toml
      - name: Upload to codecov.io
        uses: codecov/codecov-action@v1
        with:
          fail_ci_if_error: true

name: Rust

on:
  push:
    branches:
      - master
  pull_request: {}

jobs:
  check-format:
    runs-on: ubuntu-18.04
    steps:
    - uses: actions/checkout@v1
    - uses: actions-rs/cargo@v1
      with:
        command: fmt
        args: -- --check

  clippy:
    runs-on: ubuntu-18.04
    steps:
    - uses: actions/checkout@v1
    - uses: actions-rs/cargo@v1
      with:
        command: clippy

  coverage:
    runs-on: ubuntu-18.04
    container:
      image: rustmath/mkl-rust:1.43.0
      options: --security-opt seccomp=unconfined
    steps:
      - uses: actions/checkout@v2
      - name: Generate code coverage
        run: |
          cargo tarpaulin --verbose --features=intel-mkl --out Xml --manifest-path=ndarray-linalg/Cargo.toml
      - name: Upload to codecov.io
        uses: codecov/codecov-action@v1

Allow fail of upload coverage report
Allow fail of upload coverage report
