Skip to content

Commit

Permalink
Merge pull request #257 from Fatal1ty/workflow-cache
Browse files Browse the repository at this point in the history
Try to enable cache in workflow
  • Loading branch information
Fatal1ty authored Nov 12, 2024
2 parents d93d8cf + c4f4368 commit 3436b13
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,13 @@ jobs:
with:
python-version: ${{ matrix.python-version }}
allow-prereleases: true
- name: Cache Python dependencies
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('**/requirements-dev.txt') }}
restore-keys: |
${{ runner.os }}-pip-${{ matrix.python-version }}-
- name: Install dependencies
run: |
pip install --upgrade pip
Expand All @@ -35,6 +42,7 @@ jobs:
run: black --check .
- name: Run codespell
run: codespell mashumaro tests README.md .github/*.md

test-posix:
name: Tests on Posix
needs:
Expand All @@ -50,6 +58,13 @@ jobs:
with:
python-version: ${{ matrix.python-version }}
allow-prereleases: true
- name: Cache Python dependencies
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('**/requirements-dev.txt') }}
restore-keys: |
${{ runner.os }}-pip-${{ matrix.python-version }}-
- name: Install dependencies
run: |
pip install --upgrade pip
Expand All @@ -63,6 +78,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COVERALLS_FLAG_NAME: posix-${{ matrix.python-version }}
COVERALLS_PARALLEL: true

test-windows:
name: Tests on Windows
needs:
Expand All @@ -78,6 +94,13 @@ jobs:
with:
python-version: ${{ matrix.python-version }}
allow-prereleases: true
- name: Cache Python dependencies
uses: actions/cache@v4
with:
path: ~\AppData\Local\pip\Cache
key: ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('**/requirements-dev.txt') }}
restore-keys: |
${{ runner.os }}-pip-${{ matrix.python-version }}-
- name: Install dependencies
run: |
pip install --upgrade pip
Expand All @@ -92,6 +115,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COVERALLS_FLAG_NAME: windows-${{ matrix.python-version }}
COVERALLS_PARALLEL: true

coveralls:
name: Finish Coveralls
needs:
Expand Down

0 comments on commit 3436b13

Please sign in to comment.