name: Run Unit Tests

on: [push, pull_request]

jobs:
  build:
    runs-on: ubuntu-latest

    steps: 
    - uses: actions/checkout@v2
    - name: Set up Python
      uses: actions/setup-python@v2
      with:
        python-version: 2.7
    - name: Set up dependencies for python-ldap
      run: sudo apt-get install libsasl2-dev libldap2-dev libssl-dev
    - name: Base requirements for SSM
      run: pip install -r requirements.txt
    - name: Additional requirements for the unit and coverage tests
      run: pip install -r requirements-test.txt 
    - name: Pre-test set up
      run: |
        export TMPDIR=$PWD/tmp
        mkdir $TMPDIR
        export PYTHONPATH=$PYTHONPATH:`pwd -P`
        cd test
    - name: Run unit tests
      run: coverage run --branch --source=ssm,bin -m unittest discover --buffer 
    - name: Push coverage results to codecov
      run: codecov
name: Run Unit Tests

on: [push, pull_request]

jobs:
  build:
    runs-on: ubuntu-latest

    steps: 
    - uses: actions/checkout@v2
    - name: Set up Python
      uses: actions/setup-python@v2
      with:
        python-version: 2.7
    - name: Set up dependencies for python-ldap
      run: sudo apt-get install libsasl2-dev libldap2-dev libssl-dev
    - name: Base requirements for SSM
      run: pip install -r requirements.txt
    - name: Additional requirements for the unit and coverage tests
      run: pip install -r requirements-test.txt 
    - name: Pre-test set up
      run: |
        export TMPDIR=$PWD/tmp
        mkdir $TMPDIR
        export PYTHONPATH=$PYTHONPATH:`pwd -P`
        cd test
    - name: Run unit tests
      run: coverage run --branch --source=ssm,bin -m unittest discover --buffer 
    - name: Upload coverage to Codecov
      uses: codecov/codecov-action@v1

Change to using Action for codecov upload
Change to using Action for codecov upload
