From 1da31df93c552bae558c72b6db79b7695300b23d Mon Sep 17 00:00:00 2001 From: Sergiu Deitsch Date: Fri, 19 Nov 2021 21:31:29 +0100 Subject: [PATCH] ci: name unpack step and fix indent --- .github/workflows/coveralls.yml | 44 +++++++++++++++++---------------- 1 file changed, 23 insertions(+), 21 deletions(-) diff --git a/.github/workflows/coveralls.yml b/.github/workflows/coveralls.yml index 681bb0b..663e50e 100644 --- a/.github/workflows/coveralls.yml +++ b/.github/workflows/coveralls.yml @@ -34,34 +34,36 @@ jobs: var fs = require('fs'); fs.writeFileSync('${{github.workspace}}/' + artifact.name + '.zip', Buffer.from(download.data)); }); - - run: | + + - name: Unpack artifacts + run: | unzip *.zip - - name: Generate Coverage - run: | - lcov --directory . --capture --output-file coverage.info - lcov --remove coverage.info \ - '*/install/include/*' \ - '*/msys64/mingw32/*' \ - '*/msys64/mingw64/*' \ - '*/src/*_unittest.cc' \ - '*/src/googletest.h' \ - '*/src/mock-log.h' \ - '/usr/*' \ - --output-file coverage.info + - name: Generate Coverage + run: | + lcov --directory . --capture --output-file coverage.info + lcov --remove coverage.info \ + '*/install/include/*' \ + '*/msys64/mingw32/*' \ + '*/msys64/mingw64/*' \ + '*/src/*_unittest.cc' \ + '*/src/googletest.h' \ + '*/src/mock-log.h' \ + '/usr/*' \ + --output-file coverage.info - readarray -t build_dirs < <(ls -d build*/) + readarray -t build_dirs < <(ls -d build*/) - for file in src/glog/*.h.in; do - name=$(basename ${file}) - name_we=${name%.h.in} + for file in src/glog/*.h.in; do + name=$(basename ${file}) + name_we=${name%.h.in} - for build_dir in ${build_dirs[@]}; do - sed -i "s|${build_dir%/}/glog/${name_we}.h\$|${file}|g" coverage.info + for build_dir in ${build_dirs[@]}; do + sed -i "s|${build_dir%/}/glog/${name_we}.h\$|${file}|g" coverage.info + done done - done - lcov --list coverage.info + lcov --list coverage.info - name: Upload Coverage to Coveralls uses: coverallsapp/github-action@master