Skip to content

Commit

Permalink
add caching
Browse files Browse the repository at this point in the history
  • Loading branch information
wozniakpl committed Sep 16, 2024
1 parent d3fa885 commit 5bab7d7
Showing 1 changed file with 20 additions and 12 deletions.
32 changes: 20 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,23 @@ jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v2
with:
python-version: 3.12
- name: Install dependencies
run: |
python -m pip install pdm
pdm install
- name: Run tests
run: |
docker compose run --rm -d db
pdm run pytest
- uses: actions/checkout@v4
- uses: actions/setup-python@v2
with:
python-version: 3.12
- name: Cache PDM packages
uses: actions/cache@v4
with:
path: __pypackages__
key: ${{ runner.os }}-pdm-${{ hashFiles('pdm.lock') }}
restore-keys: |
${{ runner.os }}-pdm-
- name: Install dependencies
run: |
python -m pip install pdm
pdm install
- name: Run tests
run: |
docker compose run --rm -d db
nc --help
pdm run pytest

0 comments on commit 5bab7d7

Please sign in to comment.