diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 8c662b7..e195631 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -12,6 +12,8 @@ env: jobs: setup: runs-on: ubuntu-latest + outputs: + cache-hit: ${{ steps.cache.outputs.cache-hit }} steps: - name: Checkout Repository uses: actions/checkout@v4 @@ -44,12 +46,18 @@ jobs: with: python-version: ${{ env.PYTHON_VERSION }} - name: Restore Cached Dependencies + id: restore-cache uses: actions/cache@v4 with: path: ~/.cache/pip key: pip-${{ runner.os }}-${{ hashFiles('requirements-dev.txt') }} restore-keys: | pip-${{ runner.os }}- + - name: Install Dependencies (if cache not hit) + if: steps.restore-cache.outputs.cache-hit != 'true' + run: | + python -m pip install --upgrade pip + pip install -r requirements-dev.txt - name: Run Linter run: | black src @@ -58,8 +66,6 @@ jobs: runs-on: ubuntu-latest needs: setup steps: - - name: Checkout Repository - uses: actions/checkout@v4 - name: Restore Cached Dependencies uses: actions/cache@v4 with: