name: Python Package using Conda

on: [push]

jobs:
  build-linux:
    runs-on: ubuntu-latest
    strategy:
      max-parallel: 5

    steps:
    - name: Checkout repository
      uses: actions/checkout@v2
      with:
        lfs: true
    - name: Fetch LFS for waveform data
      run: |
        git lfs pull
    - name: Set up Python 3.8
      uses: actions/setup-python@v2
      with:
        python-version: 3.8
    - name: Add conda to system path
      run: |
        # $CONDA is an environment variable pointing to the root of the miniconda directory
        echo $CONDA/bin >> $GITHUB_PATH
    - name: Install dependencies
      run: |
        conda install -yq numpy sqlalchemy jupyter scipy networkx
        pip install git+https://github.com/BBN-Q/bbndb.git
        pip install bqplot
        pip install pygsti
    - name: Test with pytest
      run: |
        pip install -e .
        python -m unittest discover -v test 

name: Python Package using Conda

on: [push]

jobs:
  build-linux:
    runs-on: ubuntu-latest
    strategy:
      max-parallel: 5

    steps:
    - name: Checkout repository
      uses: actions/checkout@v2
      with:
        lfs: true
    - name: Fetch LFS for waveform data
      run: |
        git lfs pull
    - name: Set up Python 3.8
      uses: actions/setup-python@v2
      with:
        python-version: 3.8
    - name: Add conda to system path
      run: |
        # $CONDA is an environment variable pointing to the root of the miniconda directory
        echo $CONDA/bin >> $GITHUB_PATH
        mkdir ~/.cache/conda
        touch ~/.condarc
        echo "pkgs_dirs:" >> ~/.condarc
        echo "  - ~/.cache/conda" >> ~/.condarc
    
    - name: pip cache
      uses: actions/cache@v2
      with:
        path: ~/.cache/pip
        key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
        restore-keys: |
          ${{ runner.os }}-pip-
          
    - name: conda cache
      uses: actions/cache@v2
      with:
        path: ~/.cache/conda
        key: ${{ runner.os }}-conda-${{ hashFiles('**/requirements.txt') }}
        restore-keys: |
          ${{ runner.os }}-pip-
    
    - name: Install dependencies
      run: |
        conda install -yq numpy sqlalchemy jupyter scipy networkx
        pip install git+https://github.com/BBN-Q/bbndb.git
        pip install bqplot
        pip install pygsti
    - name: Test with pytest
      run: |
        pip install -e .
        python -m unittest discover -v test 

Set up conda and pip caching (?)
Set up conda and pip caching (?)