Send coverage to Coveralls in GitHub Actions Test workflow
authorHarmon <Harmon758@gmail.com>
Wed, 23 Dec 2020 22:22:57 +0000 (16:22 -0600)
committerHarmon <Harmon758@gmail.com>
Sun, 27 Dec 2020 22:35:04 +0000 (16:35 -0600)
.github/workflows/test.yml

index a5b6e8ecf96d5b8e7359dbcf3eec44fc559e0f0e..91265094b5edb426b968c6c627b945cbecbc3f31 100644 (file)
@@ -22,3 +22,23 @@ jobs:
       - name: Run tests
         run: |
           python setup.py nosetests
+      - name: Send coverage to Coveralls
+        env:
+          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+          COVERALLS_FLAG_NAME: python-${{ matrix.python-version }}
+          COVERALLS_PARALLEL: true
+        if: ${{ github.event_name == 'push' }}
+        run: |
+          coveralls
+  coveralls:
+    needs: test
+    if: ${{ github.event_name == 'push' }}
+    runs-on: ubuntu-latest
+    container: python:3-slim
+    steps:
+    - name: Finish sending coverage to Coveralls
+      env:
+        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+      run: |
+        pip install coveralls
+        coveralls --finish