diff --git a/.github/workflows/pytest.yml b/.github/workflows/pytest.yml index 35dbb2f5..aab5bc05 100644 --- a/.github/workflows/pytest.yml +++ b/.github/workflows/pytest.yml @@ -15,13 +15,21 @@ jobs: uses: actions/setup-python@v2 with: python-version: ${{ matrix.python-version }} + - name: Cache pip + uses: actions/cache@v2 + with: + # This path is specific to Ubuntu + path: ~/.cache/pip + # Look to see if there is a cache hit for the corresponding requirements file + key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }} + restore-keys: | + ${{ runner.os }}-pip-${{ runner.os }}- - name: Install dependencies run: | - python -m pip install uv - uv pip install --system flake8 pytest - if [ -f requirements.txt ]; then uv pip install --system -r requirements.txt; fi - if [ -f optional_requirements.txt ]; then uvpip install --system -r optional_requirements.txt; fi - uv pip install --system -e . + pip install flake8 pytest + if [ -f requirements.txt ]; then pip install -r requirements.txt; fi + if [ -f optional_requirements.txt ]; then pip install -r optional_requirements.txt; fi + pip install -e . - name: Test with pytest run: | pytest