From 7245ae241382d63585fea7f12760b03b88c18152 Mon Sep 17 00:00:00 2001 From: wling <90316914+wling-art@users.noreply.github.com> Date: Wed, 10 Jan 2024 05:50:04 +0800 Subject: [PATCH] Update main.yml --- .github/workflows/main.yml | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 2cf9341..09107cd 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,15 +1,18 @@ -on: - push: - branches: - - main +name: Report Test Coverage + +on: [pull_request, push] + jobs: - report: - name: deploy to staging - runs-on: ubuntu-18.04 - steps: - - name: Report test coverage to DeepSource - uses: deepsourcelabs/test-coverage-action@master - with: - key: python - coverage-file: coverage.xml - dsn: ${{ secrets.DEEPSOURCE_DSN }} + report_coverage: + runs-on: ubuntu-latest + steps: + - name: Checkout Repository + uses: actions/checkout@v2 + + - name: Report test coverage to DeepSource + uses: deepsourcelabs/test-coverage-action@master + with: + key: python + coverage-file: coverage.xml + dsn: ${{ secrets.DEEPSOURCE_DSN }} + fail-ci-on-error: true # Optional: Set to true if you want the CI build to fail on error