]> Nishi Git Mirror - gwion.git/commitdiff
Coverage action first test
authorJérémie Astor <astor.jeremie@wanadoo.fr>
Sun, 16 Feb 2020 16:00:34 +0000 (17:00 +0100)
committerJérémie Astor <astor.jeremie@wanadoo.fr>
Sun, 16 Feb 2020 16:00:34 +0000 (17:00 +0100)
.github/workflows/coverage.yml [new file with mode: 0644]

diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml
new file mode 100644 (file)
index 0000000..90e3a29
--- /dev/null
@@ -0,0 +1,35 @@
+
+name: Coverage Report
+
+on:
+  push:
+    branches:    
+    - 'master'
+
+jobs:
+  build:
+    runs-on: ubuntu-latest
+    if: "!contains(github.event.head_commit.message, '[skip ci]')"
+
+    steps:
+    - uses: actions/checkout@v1
+    - name: submodules
+      run: git submodule update --init util ast
+    - name: make
+      env:
+         CFLAGS: -ftest-coverage -fprofile-arcs  
+         LDFLAGS: -ftest-coverage -fprofile-arcs
+      run: make
+    - name: Tests
+      env:
+        VALGRIND: NO_VALGRIND
+        USE_MEMCHECK: 0
+        SEVERITY: 3
+      run: export GWION_TEST_DIR=${{ runner.tmp }}/tmp/test; mkdir $GWION_TEST_DIR && make test
+
+    - name: Report
+      run: |
+        pip install gcovr
+        COV_TXT=$(gcovr --html-details cov.html -s | grep lines | cut -d" " -f2)
+        COV_NUM=${COV_TXT: : -1}
+        echo $COV_NUM