Updates GHA to use the setup-python pipenv caching

This commit is contained in:
Trenton Holmes 2022-03-12 16:12:49 -08:00
parent 594445f6dd
commit 58066443de

View File

@ -106,34 +106,30 @@ jobs:
- -
name: Checkout name: Checkout
uses: actions/checkout@v2 uses: actions/checkout@v2
-
name: Install pipenv
run: pip install pipenv
- -
name: Set up Python name: Set up Python
uses: actions/setup-python@v2 uses: actions/setup-python@v2
with: with:
python-version: "${{ matrix.python-version }}" python-version: "${{ matrix.python-version }}"
cache: "pipenv"
- -
name: Get pip cache dir name: Install system dependencies
id: pip-cache
run: |
echo "::set-output name=dir::$(pip cache dir)"
-
name: Persistent Github pip cache
uses: actions/cache@v2
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: ${{ runner.os }}-pip${{ matrix.python-version }}
-
name: Install dependencies
run: | run: |
sudo apt-get update -qq sudo apt-get update -qq
sudo apt-get install -qq --no-install-recommends unpaper tesseract-ocr imagemagick ghostscript optipng sudo apt-get install -qq --no-install-recommends unpaper tesseract-ocr imagemagick ghostscript optipng
-
name: Install Python dependencies
run: |
pip install --upgrade pipenv pip install --upgrade pipenv
pipenv install --system --dev --ignore-pipfile pipenv install --dev --ignore-pipfile
- -
name: Tests name: Tests
run: | run: |
cd src/ cd src/
pytest pipenv run pytest
- -
name: Publish coverage results name: Publish coverage results
if: matrix.python-version == '3.9' if: matrix.python-version == '3.9'