cache test
Some checks failed
CI/CD / test-backend (pull_request) Successful in 1m25s
CI/CD / test-frontend (pull_request) Successful in 9s
CI/CD / pr-status (pull_request) Has been cancelled
CI/CD / build-and-deploy (pull_request) Has been cancelled

This commit is contained in:
2026-04-02 18:15:01 +03:00
parent 1ccdd8c66a
commit edb83e0fad

View File

@@ -19,6 +19,14 @@ jobs:
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Кэширование pip
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('api/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Установка зависимостей
run: |
@@ -73,14 +81,23 @@ jobs:
username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_TOKEN }}
- name: Cache Docker layers
uses: actions/cache@v4
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ hashFiles('api/requirements.txt') }}
restore-keys: |
${{ runner.os }}-buildx-
- name: Build Docker image
id: build
uses: docker/build-push-action@v5
with:
context: .
push: false
load: true
tags: fastapi-app:latest
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache,mode=max
- name: Stop and remove old container
run: |