From c2a7a255fdb4923a4a6af94da861746a2a58f4b6 Mon Sep 17 00:00:00 2001 From: Paul Sanders Date: Mon, 2 Oct 2023 22:07:16 -0400 Subject: [PATCH] Add dependency cache in CI --- .github/workflows/pre-release-tests.yml | 5 ++--- .github/workflows/pypi-publish.yml | 5 ++--- .github/workflows/tests.yml | 25 ++++++++++--------------- 3 files changed, 14 insertions(+), 21 deletions(-) diff --git a/.github/workflows/pre-release-tests.yml b/.github/workflows/pre-release-tests.yml index b9be462b..502d613a 100644 --- a/.github/workflows/pre-release-tests.yml +++ b/.github/workflows/pre-release-tests.yml @@ -22,10 +22,9 @@ jobs: uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} + cache: "pipenv" - name: Install pipenv - run: | - pip install pipx - pipx install pipenv + run: pipx install pipenv - name: Install dependencies run: pipenv install --dev --python=${{ matrix.python-version }} - name: Get the latest Meilisearch RC diff --git a/.github/workflows/pypi-publish.yml b/.github/workflows/pypi-publish.yml index c8c9c7f3..10203172 100644 --- a/.github/workflows/pypi-publish.yml +++ b/.github/workflows/pypi-publish.yml @@ -14,12 +14,11 @@ jobs: uses: actions/setup-python@v4 with: python-version: '3.8' + cache: "pipenv" - name: Check release validity run: sh .github/scripts/check-release.sh - name: Install pipenv - run: | - pip install pipx - pipx install pipenv + run: pipx install pipenv - name: Install dependencies run: | pipenv install diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 25849d9d..e803cfd6 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -26,10 +26,9 @@ jobs: uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} + cache: "pipenv" - name: Install pipenv - run: | - pip install pipx - pipx install pipenv + run: pipx install pipenv - name: Install dependencies run: pipenv install --dev --python=${{ matrix.python-version }} - name: Meilisearch (latest version) setup with Docker @@ -52,10 +51,9 @@ jobs: uses: actions/setup-python@v4 with: python-version: "3.8" + cache: "pipenv" - name: Install pipenv - run: | - pip install pipx - pipx install pipenv + run: pipx install pipenv - name: Install dependencies run: pipenv install --dev --python=${{ matrix.python-version }} - name: Linter with pylint @@ -70,10 +68,9 @@ jobs: uses: actions/setup-python@v4 with: python-version: 3.9 + cache: "pipenv" - name: Install pipenv - run: | - pip install pipx - pipx install pipenv + run: pipx install pipenv - name: Install dependencies run: pipenv install --dev --python=${{ matrix.python-version }} - name: mypy type check @@ -88,10 +85,9 @@ jobs: uses: actions/setup-python@v4 with: python-version: 3.9 + cache: "pipenv" - name: Install pipenv - run: | - pip install pipx - pipx install pipenv + run: pipx install pipenv - name: Install dependencies run: pipenv install --dev --python=${{ matrix.python-version }} - name: black @@ -106,10 +102,9 @@ jobs: uses: actions/setup-python@v4 with: python-version: 3.9 + cache: "pipenv" - name: Install pipenv - run: | - pip install pipx - pipx install pipenv + run: pipx install pipenv - name: Install dependencies run: pipenv install --dev --python=${{ matrix.python-version }} - name: isort