mikepenz/action-junit-report

require_tests flag is not working

fjbenitog opened this issue · 5 comments

I have seen that this flag was fixed, but I am using this configuration

      - name: Test Reports
        if: always()
        uses: mikepenz/action-junit-report@v3
        with:
          check_name: "Test Reports - Scala: ${{ matrix.scala }} | Java: ${{ matrix.java }}"
          require_tests: false
          report_paths: 'dist/test/reports/**/*.xml'

And I still have an error when I don't have tests

Thank you for the report.

Which error do you see in this case?

The error is that is executing the step even require_tests is set false.
Screenshot 2023-02-22 at 11 39 44

Thank you. I see, it's not that the action fails itself, but the report it creates is in failure state.

E.g. this causes your problem: https://github.com/mikepenz/action-junit-report/blob/main/src/annotator.ts#L27

Thanks. Yes that is the issue. But why with the previous version we didn't have that behaviour?
Previously with the same configuration that step was not executed if test were not found

Thanks a lot for your soon solution.