]> Nishi Git Mirror - gwion.git/commitdiff
update
authorJérémie Astor <astor.jeremie@wanadoo.fr>
Thu, 20 Feb 2020 21:26:51 +0000 (22:26 +0100)
committerJérémie Astor <astor.jeremie@wanadoo.fr>
Thu, 20 Feb 2020 21:26:51 +0000 (22:26 +0100)
.github/workflows/coverage.yml

index 48d49358a4f3662e679394dd6a3c2ee6f6554016..37428670480a4cb310b418dd783eda8ccc1ff45d 100644 (file)
@@ -57,13 +57,11 @@ jobs:
         echo $COV_NUM > gwion-coverage-report/coverage_num.txt
         sed -i 's/<html>/<script type="text\/javascript" src="focus.js"><\/script><html>/' index.src_*.html
         branch=$(basename ${{ github.event.ref }})
+        gcovr --filter '.*\.c$' src > lines.txt
+        gcovr --filter '.*\.c$' --branches src > branches.txt
         cd gwion-coverage-report/
         bash old.sh $branch
         bash summary.sh
-        cd ..
-        gcovr --filter '.*\.c$' src > gwion-coverage-report/html/$branch/lines.txt
-        gcovr --filter '.*\.c$' --branches src > gwion-coverage-report/html/$branch/branches.txt
-        mv *.html gwion-coverage-report/html/$branch
 
     - name: Make badge
       if: github.event_name == 'push' && github.event.ref == 'refs/heads/master'
@@ -71,17 +69,28 @@ jobs:
         cd gwion-coverage-report
         bash badge.sh
 
-    - name: Push Report
-      if: github.event_name == 'push'
+    - name: git config
+      if: github.event_name == 'push' && github.event.ref == 'refs/heads/master'
       run: |
         cd gwion-coverage-report
         git config --local user.email "action@github.com"
         git config --local user.name "GitHub Action"
         git remote set-url origin https://${{ secrets.COVERAGE_TOKEN }}@github.com/fennecdjay/gwion-coverage-report.git
+
+    - name: Push Report
+      if: github.event_name == 'push' && github.event.ref == 'refs/heads/master'
+      run: |
+        cd gwion-coverage-report
         git add README.md coverage_num.txt
         git commit -m "Update coverage" || true
         git push || true
-        git push origin :gh-pages || true
+
+    - name: Push Pages
+      if: github.event_name == 'push'
+      run: |
+        cd gwion-coverage-report
+        rm -r html
+        mv *.html *.txt gwion-coverage-report/html/$branch
         cp focus.js html
         git add -f html
         git commit -m "Update html report"