Skip to content

Commit

Permalink
CI: use builtin cache in actions/setup-python
Browse files Browse the repository at this point in the history
  • Loading branch information
lazka committed Jun 30, 2024
1 parent 5996987 commit 70fba56
Showing 1 changed file with 5 additions and 19 deletions.
24 changes: 5 additions & 19 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,6 @@ jobs:
- os: windows-latest
python-version: pypy-3.9
include:
- os: ubuntu-latest
pip-cache: ~/.cache/pip
poetry-cache: ~/.cache/pypoetry
- os: macos-latest
pip-cache: ~/Library/Caches/pip
poetry-cache: ~/Library/Caches/pypoetry
- os: windows-latest
pip-cache: ~\AppData\Local\pip\Cache
poetry-cache: ~\AppData\Local\pypoetry\Cache
- os: ubuntu-latest
python-version: 3.8
build-docs: true
Expand All @@ -35,24 +26,19 @@ jobs:
build-docs: true
steps:
- uses: actions/checkout@v4

- name: Install poetry
run: pipx install poetry

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'poetry'
allow-prereleases: true

- uses: actions/cache@v4
with:
path: |
${{ matrix.pip-cache }}
${{ matrix.poetry-cache }}
key: ${{ runner.os }}-${{ hashFiles('**/pyproject.toml') }}
restore-keys: |
${{ runner.os }}-
- name: Install dependencies
run: |
python -m pip install --upgrade poetry
poetry install
- name: Run tests
run: |
Expand Down

0 comments on commit 70fba56

Please sign in to comment.