From 240a95ad14dabf91698b323e150b5f506dc8ad8b Mon Sep 17 00:00:00 2001 From: Yannick Augenstein Date: Sat, 18 Nov 2023 21:06:52 -0800 Subject: [PATCH] Fix and simplify pip cache dir check --- .github/workflows/run_tests.yml | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/.github/workflows/run_tests.yml b/.github/workflows/run_tests.yml index c1649dd..3098162 100644 --- a/.github/workflows/run_tests.yml +++ b/.github/workflows/run_tests.yml @@ -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 @@ -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