name: tox-pytest

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: 3.8
    - name: Install dependencies
      run: |
        sudo apt-get install libsnappy-dev
        python -m pip install --upgrade pip
        pip install tox
    - name: Run PyTest with Tox
      env:
        API_KEY_EIA: ${{ secrets.API_KEY_EIA }}
      run: tox -ve ci -- --fast
    - name: Upload Test Coverage to codecov.io
      uses: codecov/codecov-action@v1
    - name: Archive code coverage results
      uses: actions/upload-artifact@v2
      with:
        name: code-coverage-report
        path: coverage.xml
    - name: Notify Slack
      uses: 8398a7/action-slack@v3
      with:
        status: ${{ job.status }}
        fields: repo,message,commit,author,workflow,took
      env:
        GITHUB_TOKEN: ${{ github.token }} # required
        SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} # required
        MATRIX_CONTEXT: ${{ toJson(matrix) }} # required
      if: always() # Pick up events even if the job fails or is canceled.

name: tox-pytest

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: 3.8

    - name: Install dependencies
      run: |
        sudo apt-get install libsnappy-dev
        python -m pip install --upgrade pip
        pip install tox

    - name: Run PyTest with Tox
      env:
        API_KEY_EIA: ${{ secrets.API_KEY_EIA }}
      run: tox -ve ci -- --fast

    - name: Upload Test Coverage to codecov.io
      uses: codecov/codecov-action@v1

    - name: Archive code coverage results
      uses: actions/upload-artifact@v2
      with:
        name: code-coverage-report
        path: coverage.xml

    - name: Notify Slack
      uses: 8398a7/action-slack@v3
      with:
        status: ${{ job.status }}
        fields: repo,message,commit,author,workflow,took
      env:
        GITHUB_TOKEN: ${{ github.token }} # required
        SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} # required
        MATRIX_CONTEXT: ${{ toJson(matrix) }} # required
      if: always() # Pick up events even if the job fails or is canceled.

Remove attempt at caching inputs. It's going to be harder.
Remove attempt at caching inputs. It's going to be harder.
