diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index 2b68ecee..2ff66d6d 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -167,6 +167,7 @@ jobs: id: test-results uses: ./ with: + github_token: ${{ secrets.PAT }} check_name: Test Results (Dockerfile) junit_files: "artifacts/**/*.xml" json_file: "tests.json" @@ -300,7 +301,7 @@ jobs: -v "/home/runner/work/publish-unit-test-result-action/publish-unit-test-result-action":"$GITHUB_WORKSPACE" \ enricomi/publish-unit-test-result-action:latest env: - INPUT_GITHUB_TOKEN: ${{ github.token }} + INPUT_GITHUB_TOKEN: ${{ secrets.PAT }} INPUT_CHECK_NAME: Test Results (Docker Image) INPUT_JUNIT_FILES: "artifacts/**/*.xml" INPUT_JSON_FILE: "tests.json" @@ -426,6 +427,7 @@ jobs: id: test-results uses: ./composite with: + github_token: ${{ secrets.PAT }} check_name: Test Results (${{ matrix.os-label }} python ${{ matrix.python }}) junit_files: "artifacts${{ steps.os.outputs.path-sep }}**${{ steps.os.outputs.path-sep }}*.xml" json_file: "tests.json" @@ -476,6 +478,7 @@ jobs: id: test-results uses: ./composite with: + github_token: ${{ secrets.PAT }} check_name: Test Results (setup-python) junit_files: "artifacts/**/*.xml" json_file: "tests.json" @@ -515,6 +518,7 @@ jobs: id: test-results uses: ./ with: + github_token: ${{ secrets.PAT }} check_name: Test Results (Test Files) fail_on: nothing junit_files: "test-files/junit-xml/**/*.xml" @@ -559,6 +563,7 @@ jobs: id: test-results uses: ./ with: + github_token: ${{ secrets.PAT }} check_name: Test Results (Test File) fail_on: nothing junit_files: "test-files/pytest/junit.gloo.standalone.xml" diff --git a/python/publish/publisher.py b/python/publish/publisher.py index 2618a51f..e7afb8be 100644 --- a/python/publish/publisher.py +++ b/python/publish/publisher.py @@ -298,7 +298,7 @@ def publish_check(self, # get stats from earlier commits before_stats = None before_check_run = None - if self._settings.compare_earlier: + if self._settings.compare_earlier and False: before_commit_sha = self._settings.event.get('before') logger.debug(f'comparing against before={before_commit_sha}') before_check_run = self.get_check_run(before_commit_sha) @@ -319,6 +319,7 @@ def publish_check(self, summary_with_digest = get_long_summary_with_digest_md(stats_with_delta, stats) split_annotations = [annotation.to_dict() for annotation in all_annotations] split_annotations = [split_annotations[x:x+50] for x in range(0, len(split_annotations), 50)] or [[]] + split_annotations = [] for annotations in split_annotations: output = dict( title=title, @@ -347,7 +348,7 @@ def publish_check(self, stats=stats, stats_with_delta=stats_with_delta if before_stats is not None else None, annotations=all_annotations, - check_url=check_run.html_url + check_url=check_run.html_url if check_run else None ) self.publish_json(data)