Skip to content

Commit

Permalink
Merge pull request #576 from NatLibFi/gh-actions-pip-cache
Browse files Browse the repository at this point in the history
Enable pip cache in GitHub Actions CI jobs
  • Loading branch information
juhoinkinen authored Mar 1, 2022
2 parents 7c9a014 + 4b40ec5 commit 2168ec4
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ on:
- master
pull_request:
workflow_dispatch:
env:
PIP_UPGRADE: "true" # always upgrade to latest version
PIP_UPGRADE_STRATEGY: "eager" # upgrade all dependencies
jobs:
test:
runs-on: ubuntu-latest
Expand All @@ -28,9 +31,11 @@ jobs:
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
cache: pip
cache-dependency-path: setup.py
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools wheel
python -m pip install pip setuptools wheel
python -m pip install .[dev]
python -m nltk.downloader punkt
# Selectively install the optional dependencies for some Python versions
Expand Down Expand Up @@ -74,6 +79,8 @@ jobs:
uses: actions/setup-python@v2
with:
python-version: '3.8'
cache: pip
cache-dependency-path: setup.py
- name: Build distribution
run: |
python -m pip install wheel
Expand Down

0 comments on commit 2168ec4

Please sign in to comment.