From 720caccc30508d96028915010a7ba0cdec756495 Mon Sep 17 00:00:00 2001 From: Jagoda11 Date: Mon, 23 Dec 2024 01:45:45 +0100 Subject: [PATCH] fix for CI script --- ".github/workflows/\360\237\232\200ci.yml" | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git "a/.github/workflows/\360\237\232\200ci.yml" "b/.github/workflows/\360\237\232\200ci.yml" index b643ccb..d08e0ae 100644 --- "a/.github/workflows/\360\237\232\200ci.yml" +++ "b/.github/workflows/\360\237\232\200ci.yml" @@ -36,16 +36,16 @@ jobs: run: npm run build - name: ๐Ÿงช Test with coverage run: npm run test - - name: ๐Ÿ“ค Commit and push generated test files + - name: ๐Ÿ“ค Commit and push all changes run: | git config --global user.name 'github-actions[bot]' git config --global user.email 'github-actions[bot]@users.noreply.github.com' - if ls src/**/*.test.tsx 1> /dev/null 2>&1; then - git add -A src/**/*.test.tsx # Include untracked files - git commit -m '๐Ÿค– Generated unit tests' - git push || echo "No changes to push." + if ! git diff --quiet; then + git add -A + git commit -m '๐Ÿค– Auto-commit changes from CI' + git push else - echo "No test files to commit. Skipping this step." + echo "No changes detected. Skipping commit." fi shell: /usr/bin/bash -e {0}