diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index cd150a6..25d4203 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -33,6 +33,7 @@ jobs: modules: ${{ steps.modulelist.outputs.modules }} steps: - uses: actions/checkout@v4 + - name: Get monorepo modules id: modulelist uses: ./.github/actions/go-test-monorepo-action @@ -50,37 +51,50 @@ jobs: fail-fast: false steps: - uses: actions/checkout@v4 + - name: Run tests and generate coverage reports id: modulelist uses: ./.github/actions/go-test-monorepo-action with: go-version: '>=1.21.0' - # - name: Check if coverage data exists - # if: success() || failure() - # id: check-coverage - # working-directory: ./${{ matrix.package }} - # run: | - # if [ $(wc -l > $GITHUB_ENV + + - name: Upload coverage + if: steps.check-coverage.outputs.coverage_data_exists == 'true' + uses: coverallsapp/github-action@v2 + with: + flag-name: ${{ steps.prepare-flag.outputs.clean_module_name }} + parallel: true + github-token: ${{ secrets.GITHUB_TOKEN }} + file: ${{ matrix.module }}/coverage.out - # finish: - # needs: test - # if: ${{ always() }} - # runs-on: ubuntu-latest - # steps: - # - name: Coveralls Finish - # uses: coverallsapp/github-action@v2 - # with: - # parallel-finished: true + finish-coverage-report: + needs: test-modules + if: ${{ always() }} + runs-on: ubuntu-latest + steps: + - name: Coveralls Finish + uses: coverallsapp/github-action@v2 + with: + parallel-finished: true