Skip to content

Commit

Permalink
Fix and simplify pip cache dir check
Browse files Browse the repository at this point in the history
  • Loading branch information
yaugenst committed Nov 19, 2023
1 parent a405664 commit 240a95a
Showing 1 changed file with 4 additions and 12 deletions.
16 changes: 4 additions & 12 deletions .github/workflows/run_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,15 @@ jobs:
platform: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Set pip cache directory
- name: Get pip cache directory
id: pip-cache
run: |
if [[ $RUNNER_OS == 'Windows' ]]; then
echo "dir=C:\\Users\\runneradmin\\AppData\\Local\\pip\\Cache" >> $GITHUB_OUTPUT
else
echo "dir=~/.cache/pip" >> $GITHUB_OUTPUT
fi
run: echo "dir=$(pip cache dir)" >> $GITHUB_OUTPUT
shell: bash

- name: Cache pip dependencies
Expand All @@ -40,9 +34,7 @@ jobs:
restore-keys: ${{ runner.os }}-pip-

- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install .[dev]
run: pip install .[dev]

- name: Type check with mypy
run: mypy tofea
Expand Down

0 comments on commit 240a95a

Please sign in to comment.