File tree Expand file tree Collapse file tree 1 file changed +28
-5
lines changed Expand file tree Collapse file tree 1 file changed +28
-5
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,8 @@ name: Coverage
22permissions :
33 contents : write
44 pull-requests : write
5+ pages : write
6+ id-token : write
57on :
68 push :
79 branches :
1113 - opened
1214 - synchronize
1315 - reopened
16+ concurrency :
17+ group : " pages"
18+ cancel-in-progress : false
1419jobs :
1520 Linux :
1621 strategy :
@@ -53,30 +58,48 @@ jobs:
5358 - name : Merge coverages
5459 run : |
5560 LCOV_FILES=$(find coverage-artifacts -name "lcov.info" -type f)
56-
61+
5762 if [ -z "$LCOV_FILES" ]; then
5863 echo "No lcov.info files found in the artifacts!"
5964 exit 1
6065 fi
61-
66+
6267 CMD="lcov"
6368 for LCOV_FILE in $LCOV_FILES; do
6469 echo "Adding coverage file: $LCOV_FILE"
6570 CMD+=" -a $LCOV_FILE"
6671 done
6772 CMD+=" -o lcov.info"
68-
73+
6974 echo "Executing: $CMD"
7075 eval $CMD
71-
76+
7277 if [ ! -f "lcov.info" ]; then
7378 echo "Failed to generate merged lcov.info file!"
7479 exit 1
7580 fi
76-
81+
7782 echo "Successfully merged $(echo $LCOV_FILES | wc -w) coverage files."
83+ - name : Generate HTML report
84+ run : |
85+ genhtml lcov.info -o coverage
7886 - name : Report coverage
7987 uses : k1LoW/octocov-action@v1
8088 with :
8189 github-token : ${{ secrets.GITHUB_TOKEN }}
8290 config : .github/octocov.yml
91+ - name : Upload pages artifact
92+ uses : actions/upload-pages-artifact@v3
93+ with :
94+ path : coverage
95+ Deploy :
96+ needs : Coverage
97+ if : github.event_name == 'push' && github.ref == 'refs/heads/main'
98+ environment :
99+ name : github-pages
100+ url : ${{ steps.deployment.outputs.page_url }}
101+ runs-on : ubuntu-latest
102+ steps :
103+ - name : Deploy to GitHub Pages
104+ id : deployment
105+ uses : actions/deploy-pages@v4
You can’t perform that action at this time.
0 commit comments