# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

name: ci

on:
  push:
    branches:
      - master
  pull_request:
    branches:
      - '*'

jobs:
  build:

    runs-on: ubuntu-latest
    strategy:
      fail-fast: false      
      matrix:
        python-version: [3.10.0]

    steps:
    - uses: actions/checkout@v2
    - name: Set up Python ${{ matrix.python-version }}
      uses: actions/setup-python@v2
      with:
        python-version: ${{ matrix.python-version }}
    - name: Dependencies
      run: |
        python -m pip install --upgrade pip
        pip install poetry
        poetry config virtualenvs.create false
        poetry install
    - name: Linter
      run: |
        pylint fs/onedrivefs/ tests/
    - name: Tests
      env:
        GRAPH_API_CLIENT_ID: ${{ secrets.GRAPH_API_CLIENT_ID }}
        GRAPH_API_CLIENT_SECRET: ${{ secrets.GRAPH_API_CLIENT_SECRET }}
        GRAPH_API_TOKEN_READONLY: ${{ secrets.GRAPH_API_TOKEN_READONLY }}
        NGROK_AUTH_TOKEN: ${{ secrets.NGROK_AUTH_TOKEN }}
      run: |
        pytest --cov=fs --reruns 2 --only-rerun requests.exceptions.HTTPError
        coverage xml
    - name: Coverage
      uses: codecov/codecov-action@v1.0.7
      with:
        token: ${{ secrets.CODECOV_TOKEN }}

# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

name: ci

on:
  push:
    branches:
      - master
  pull_request:
    branches:
      - '*'

jobs:
  build:

    runs-on: ubuntu-latest
    strategy:
      fail-fast: false      
      matrix:
        python-version: [3.10.0]

    steps:
    - uses: actions/checkout@v2
    - name: Set up Python ${{ matrix.python-version }}
      uses: actions/setup-python@v2
      with:
        python-version: ${{ matrix.python-version }}
    - name: Dependencies
      run: |
        python -m pip install --upgrade pip
        pip install poetry
        poetry config virtualenvs.create false
        poetry install
    - name: Linter
      run: |
        pylint fs/onedrivefs/ tests/
    - name: Tests
      env:
        GRAPH_API_CLIENT_ID: ${{ secrets.GRAPH_API_CLIENT_ID }}
        GRAPH_API_CLIENT_SECRET: ${{ secrets.GRAPH_API_CLIENT_SECRET }}
        GRAPH_API_TOKEN_READONLY: ${{ secrets.GRAPH_API_TOKEN_READONLY }}
        NGROK_AUTH_TOKEN: ${{ secrets.NGROK_AUTH_TOKEN }}
      run: |
        pytest --cov=fs --reruns 2 --only-rerun requests.exceptions.HTTPError
        coverage xml
    - name: Coverage
      uses: codecov/codecov-action@v2.1.0

Upgrade codecov uploader to account for bash uploader deprecation
Upgrade codecov uploader to account for bash uploader deprecation
