diff options
| author | Menny Even Danan <menny@evendanan.net> | 2020-02-06 19:15:10 +0000 |
|---|---|---|
| committer | Menny Even Danan <menny@evendanan.net> | 2020-02-06 21:01:24 +0000 |
| commit | db254705f181f30d3629a9af6d8fdc83ee8a9583 (patch) | |
| tree | 741614e95216d0e2817e269b9ab0333b09b1a2e3 /.github/actions | |
| parent | 8d4973f6734c83de4a988f28ae5e3ea0ba8c12b4 (diff) | |
| download | AnySoftKeyboard-db254705f181f30d3629a9af6d8fdc83ee8a9583.tar.gz AnySoftKeyboard-db254705f181f30d3629a9af6d8fdc83ee8a9583.tar.bz2 | |
Fix collect-report shell script
Diffstat (limited to '.github/actions')
| -rwxr-xr-x | .github/actions/codecov/upload_coverage.sh | 13 | ||||
| -rw-r--r-- | .github/actions/collect-reports/action.yml | 3 | ||||
| -rwxr-xr-x | .github/actions/collect-reports/collect.sh | 15 |
3 files changed, 25 insertions, 6 deletions
diff --git a/.github/actions/codecov/upload_coverage.sh b/.github/actions/codecov/upload_coverage.sh index 061f15565..d54d50ba6 100755 --- a/.github/actions/codecov/upload_coverage.sh +++ b/.github/actions/codecov/upload_coverage.sh @@ -6,6 +6,15 @@ CODECOV_TOKEN="${1}" wget --tries=5 --waitretry=5 --progress=dot:mega --output-document=codecov.sh https://codecov.io/bash chmod +x codecov.sh -COV_FILES=$(find . -name "test*UnitTestCoverage.xml" | xargs -n 1 echo -n " -f ") +readarray -d '' COV_FILES < <(find . -name "test*UnitTestCoverage.xml" -print0) -./scripts/retry.sh 5 ./codecov.sh -t "${CODECOV_TOKEN}" -y .github/actions/codecov/codecov.yml -X gcov -X coveragepy -X xcode ${COV_FILES} +rm -rf /tmp/coverage || true +mkdir /tmp/coverage + +for cov_file in "${COV_FILES[@]}" +do + echo "file: ${cov_file}" + cp "${cov_file}" "/tmp/coverage/${RANDOM}-${RANDOM}.xml" +done + +./scripts/retry.sh 5 ./codecov.sh -t "${CODECOV_TOKEN}" -y .github/actions/codecov/codecov.yml -X search -X gcov -X coveragepy -X xcode -f '/tmp/coverage/*.xml' diff --git a/.github/actions/collect-reports/action.yml b/.github/actions/collect-reports/action.yml index 7dc42a525..01646533c 100644 --- a/.github/actions/collect-reports/action.yml +++ b/.github/actions/collect-reports/action.yml @@ -7,7 +7,8 @@ inputs: description: "collect destination" default: "collected_reports" file_pattern: - description: "pattern" + description: "pattern for files" + required: true runs: using: "docker" diff --git a/.github/actions/collect-reports/collect.sh b/.github/actions/collect-reports/collect.sh index 6b641f0c2..eed70a4ad 100755 --- a/.github/actions/collect-reports/collect.sh +++ b/.github/actions/collect-reports/collect.sh @@ -2,6 +2,15 @@ set -e OUTPUT=${1} -PATTERN=${2} -mkdir ${OUTPUT} || true -find . -path ./${OUTPUT} -prune -o -name "${PATTERN}" -exec cp {} ${OUTPUT}/ \; +FILE_PATTERN=${2} + +rm -rf "/tmp/${OUTPUT}" || true +mkdir -p "/tmp/${OUTPUT}" +rm -rf "${OUTPUT}" || true +mkdir -p "${OUTPUT}" + +TEMP_TAR="/tmp/${OUTPUT}/archive.tar" +tar -cvf "${TEMP_TAR}" --files-from /dev/null +find . -path "${FILE_PATTERN}" -exec tar uvf "${TEMP_TAR}" {} \; + +mv "${TEMP_TAR}" "${OUTPUT}/" |
