From 4452e1ea7019a300186647fe8c3349b49f10fab6 Mon Sep 17 00:00:00 2001 From: Jon Lee Date: Sun, 10 Jul 2022 19:16:13 +0800 Subject: [PATCH] ci: Upload coverage data to coveralls.io --- .github/workflows/release.yml | 41 +++++++++++++++++------------------ 1 file changed, 20 insertions(+), 21 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e96f1b6..aa75992 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -35,16 +35,16 @@ jobs: - name: Install dependencies run: | pip install -r requirements.txt - pip install coveralls + pip install --upgrade coveralls - name: Run tests run: coverage run -m unittest discover -s tests -t tests -# - name: Upload coverage data to coveralls.io -# run: coveralls --service=github -# env: -# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} -# COVERALLS_FLAG_NAME: ${{ matrix.os }} - ${{ matrix.python-version }} -# COVERALLS_PARALLEL: true + - name: Upload coverage data to coveralls.io + run: coveralls --service=github + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + COVERALLS_FLAG_NAME: ${{ matrix.os }} - ${{ matrix.python-version }} + COVERALLS_PARALLEL: true lint: name: Run Linters @@ -60,24 +60,23 @@ jobs: DEFAULT_BRANCH: master GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} -# coveralls: -# name: Indicate completion to coveralls.io -# needs: test -# runs-on: ubuntu-latest -# container: python:3-slim -# steps: -# - name: Finished -# run: | -# pip3 install --upgrade coveralls -# coveralls --service=github --finish -# env: -# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + coveralls: + name: Indicate completion to coveralls.io + needs: test + runs-on: ubuntu-latest + container: python:3-slim + steps: + - name: Finished + run: | + pip3 install --upgrade coveralls + coveralls --service=github --finish + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} release: name: Release runs-on: ubuntu-latest -# needs: [ test, coveralls ] - needs: [ test ] + needs: [ test, coveralls ] steps: - name: Checkout uses: actions/checkout@v2