Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Try to enable cache in workflow #257

Merged
merged 1 commit into from
Nov 12, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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