name: Pull request unit tests

on:
  pull_request:
    branches: [ main ]

jobs:

  build-pipenv:

    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v2

    - name: Set up Python
      uses: actions/setup-python@v2
      with:
        python-version: 3.8

    - name: Install pipenv
      uses: dschep/install-pipenv-action@v1

    - name: Run make file
      run: |
        make

    - name: Run unit tests over results
      run: |
        pipenv install --dev
        pipenv run python -m unittest discover -p 'test_*.py'
