graph-rs-sdk 3.0.1

Rust SDK Client for Microsoft Graph and Microsoft Identity Platform
name: Rust Build and Clippy Analyze

on:
  push:
    branches: [ master ]
  pull_request:
    branches: [ master ]
  workflow_dispatch:
    inputs:
      logLevel:
        description: 'Log level'
        required: true
        default: 'warning'
        type: choice
        options:
        - info
        - warning
        - debug


env:
  CARGO_TERM_COLOR: always


jobs:
  build:

    runs-on: ubuntu-latest
    environment: test-environment

    steps:
    - uses: actions/checkout@v3.0.2
    - name: Build
      run: cargo build --verbose
    - name: Run tests
      env:
        APP_REGISTRATIONS: ${{ secrets.APP_REGISTRATIONS }}
      run: cargo test --verbose

    - name: Install required cargo
      run: cargo install clippy-sarif sarif-fmt

    - name: Run rust-clippy
      run:
        cargo clippy
        --all-features
        --message-format=json | clippy-sarif | tee rust-clippy-results.sarif | sarif-fmt
      continue-on-error: true

    - name: Upload analysis results to GitHub
      uses: github/codeql-action/upload-sarif@v2
      with:
        sarif_file: rust-clippy-results.sarif
        wait-for-processing: true