Skip to content
This repository has been archived by the owner on Feb 5, 2022. It is now read-only.

Commit

Permalink
Add cache for CI
Browse files Browse the repository at this point in the history
  • Loading branch information
sanders41 committed Sep 19, 2021
1 parent 3ebc3f1 commit 7474052
Showing 1 changed file with 28 additions and 9 deletions.
37 changes: 28 additions & 9 deletions .github/workflows/testing.yaml
Expand Up @@ -20,10 +20,20 @@ jobs:
run: |
curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/install-poetry.py | python -
echo "${HOME}/.local/bin" >> $GITHUB_PATH
- name: Install Dependencies
- name: Configure poetry
run: |
pip install -U pip
poetry install
poetry config virtualenvs.create true
poetry config virtualenvs.in-project true
- name: Cache poetry venv
uses: actions/cache@v2
id: poetry-cache
with:
path: .venv
key: venv-${{ runner.os }}-poetry-${{ hashFiles('**/poetry.lock') }}
restore-keys: venv-${{ runner.os }}-poetry-
- name: Install Dependencies
if: steps.poetry-cache.outputs.cache-hit != 'true'
run: poetry install
- name: Isort check
run: |
poetry run isort meilisearch_status_check_decorator tests --check-only
Expand All @@ -39,7 +49,6 @@ jobs:
- name: mypy check
run: |
poetry run mypy meilisearch_status_check_decorator
testing:
strategy:
fail-fast: false
Expand All @@ -56,14 +65,24 @@ jobs:
run: |
curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/install-poetry.py | python -
echo "${HOME}/.local/bin" >> $GITHUB_PATH
- name: Poetry configuration
if: matrix.python-version == '3.10.0-beta - 3.10.0' # Poetry installs are currently failing with experimental installer on 3.10
- name: Configure poetry
run: |
poetry config virtualenvs.create true
poetry config virtualenvs.in-project true
- name: Configure poetry Python 3.10
if: matrix.python-version == '3.10.0-beta - 3.10.0' # Poetry installs are currently failing with the experimental installer on 3.10
run: |
poetry config experimental.new-installer false
- name: Cache poetry venv
uses: actions/cache@v2
id: poetry-cache
with:
path: .venv
key: venv-${{ runner.os }}-poetry-${{ hashFiles('**/poetry.lock') }}
restore-keys: venv-${{ runner.os }}-poetry-
- name: Install Dependencies
run: |
pip install -U pip
poetry install
if: steps.poetry-cache.outputs.cache-hit != 'true'
run: poetry install
- name: MeiliSearch (latest version) setup with Docker
run: |
docker run -d -p 7700:7700 getmeili/meilisearch:latest ./meilisearch --no-analytics=true --master-key=masterKey
Expand Down

0 comments on commit 7474052

Please sign in to comment.