From: Jérémie Astor Date: Mon, 17 Feb 2020 19:42:41 +0000 (+0100) Subject: :wrench: use html dir X-Git-Tag: nightly~1882 X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=d4b3fd8ef2eea8e63969444839ad375b8ca76814;p=gwion.git :wrench: use html dir --- diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 990f929b..31409176 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -5,6 +5,9 @@ on: push: branches: - 'master' + pull_request: + branches: + - 'master' jobs: build: @@ -47,7 +50,8 @@ jobs: printf '# Gwion coverage\n```\n' > gwion-coverage-report/README.md gcovr -s --filter '.*\.c$' src >> gwion-coverage-report/README.md printf '```\n' >> gwion-coverage-report/README.md - COV_TXT=$(gcovr -s --html-details gwion-coverage-report/index.html --html-title "Gwion coverage report" --filter '.*\.c$' src | grep lines | cut -d" " -f2) + mkdir gwion-coverage-report/html + COV_TXT=$(gcovr -s --html-details gwion-coverage-report/html/index.html --html-title "Gwion coverage report" --filter '.*\.c$' src | grep lines | cut -d" " -f2) COV_NUM=${COV_TXT: : -1} echo $COV_NUM > gwion-coverage-report/coverage_num.txt if [ $(python -c "print( $COV_NUM >= 90 )") = True ] @@ -69,7 +73,11 @@ jobs: cd gwion-coverage-report git config --local user.email "action@github.com" git config --local user.name "GitHub Action" - git add . - git commit -m "Update coverage" git remote set-url origin https://${{ secrets.COVERAGE_TOKEN }}@github.com/fennecdjay/gwion-coverage-report.git - git push origin + git add README.md coverage_num.txt + git commit -m "Update coverage" + git push + git add -f html + git commit -m "Update html report" + git push origin :gh-pages || true + git subtree push --prefix html origin gh-pages