Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

question: How to merge results from different actions #389

Open
gaocegege opened this issue Jul 20, 2022 · 0 comments
Open

question: How to merge results from different actions #389

gaocegege opened this issue Jul 20, 2022 · 0 comments

Comments

@gaocegege
Copy link

Our project contains one job for unit test and the other one for e2e. We want to merge the coverage result, then send them to coveralls.

The current code looks like:

  test:
    name: test
    strategy:
      matrix:
        os: [ubuntu-latest]
    runs-on: ${{ matrix.os }}
    env:
      GOPATH: ${{ github.workspace }}/go
    steps:
      - name: Test
        run: make test
      - name: send coverage
        uses: shogo82148/actions-goveralls@v1
        with:
          path-to-profile: coverage.out
          working-directory: ${{ env.GOPATH }}/src/github.com/tensorchord/envd
          flag-name: unit test
          parallel: true
  e2e:
    name: e2e
    strategy:
      matrix:
        os: [ubuntu-latest]
    runs-on: ${{ matrix.os }}
    env:
      GOPATH: ${{ github.workspace }}/go
    defaults:
      run:
        working-directory: ${{ env.GOPATH }}/src/github.com/tensorchord/envd
    steps:
      - name: e2e test
        run: make e2e-test
      - name: send coverage
        uses: shogo82148/actions-goveralls@v1
        with:
          path-to-profile: e2e-coverage.out
          working-directory: ${{ env.GOPATH }}/src/github.com/tensorchord/envd
          flag-name: e2e
          parallel: true
  # notifies that all test jobs are finished.
  finish:
    needs:
      - test
      - e2e
    runs-on: ubuntu-latest
    steps:
      - uses: shogo82148/actions-goveralls@v1
        with:
          parallel-finished: true

But it does not work. The coverage of unit test is 6% and the coverage of e2e is 36%. The correct coverage should be 40%+, but we only get 36%, the result of the latter test coverage report.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant