Improve CI workflow by adding logging for zip creation and enforcing file presence. Added error handling for zip commands and a check to ensure artifacts are created before upload.
Some checks failed
CI/CD / test-backend (pull_request) Successful in 7s
CI/CD / test-frontend (pull_request) Successful in 9s
CI/CD / create-archives (pull_request) Failing after 3s
CI/CD Pipeline / Overall Status ✅ All checks passed successfully
CI/CD / pr-status (pull_request) Successful in 1s
CI/CD / comment-on-failure (pull_request) Has been skipped
CI/CD / cleanup (pull_request) Successful in 1s

This commit is contained in:
2026-03-24 12:21:36 +03:00
parent 0fe735ddf0
commit a06a9f585b

View File

@@ -65,8 +65,12 @@ jobs:
- name: Create archives
run: |
zip -r api.zip api/ -x "*.pyc" "*__pycache__*" "*.git*" "*.pytest_cache*"
zip -r web.zip web/ -x "node_modules/*" ".git*" "dist/*" "*.log"
echo "Creating api.zip..."
zip -r api.zip api/ -x "*.pyc" "*__pycache__*" "*.git*" "*.pytest_cache*" || echo "Warning: zip command failed for api"
echo "Creating web.zip..."
zip -r web.zip web/ -x "node_modules/*" ".git*" "dist/*" "*.log" || echo "Warning: zip command failed for web"
# Проверяем, что файлы созданы
ls -la api.zip web.zip
- name: Upload artifacts
uses: actions/upload-artifact@v4
@@ -76,6 +80,7 @@ jobs:
api.zip
web.zip
retention-days: 7
if-no-files-found: error # добавим, чтобы явно указывать, что файлы обязательны
# Явный статус для PR
pr-status: