@@ -94,21 +94,30 @@ jobs:
9494 - name : Run unit tests
9595 run : hatch run test:unit-cov-retry
9696
97- # On PR: generates coverage comment artifact. On push to main: stores coverage baseline on data branch.
97+ # On PR: posts coverage comment (directly on same-repo PRs; via artifact for fork PRs) . On push to main: stores coverage baseline on data branch.
9898 - name : Store unit tests coverage
99+ id : coverage_comment
99100 if : matrix.python-version == '3.10' && runner.os == 'Linux' && github.event_name != 'schedule'
100101 uses : py-cov-action/python-coverage-comment-action@7188638f871f721a365d644f505d1ff3df20d683 # v3.40
101102 with :
102103 GITHUB_TOKEN : ${{ github.token }}
103104 COVERAGE_PATH : integrations/amazon_bedrock
104105 SUBPROJECT_ID : amazon_bedrock
105- COMMENT_ARTIFACT_NAME : coverage-comment-amazon_bedrock
106+ MINIMUM_GREEN : 90
107+ MINIMUM_ORANGE : 60
108+
109+ - name : Upload coverage comment to be posted
110+ if : matrix.python-version == '3.10' && runner.os == 'Linux' && github.event_name == 'pull_request' && steps.coverage_comment.outputs.COMMENT_FILE_WRITTEN == 'true'
111+ uses : actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
112+ with :
113+ name : coverage-comment-amazon_bedrock
114+ path : python-coverage-comment-action-amazon_bedrock.txt
106115
107116 # Do not authenticate on PRs from forks and on PRs created by dependabot
108117 - name : AWS authentication
109118 id : aws-auth
110119 if : github.event_name == 'schedule' || (github.event.pull_request.head.repo.full_name == github.repository && !startsWith(github.event.pull_request.head.ref, 'dependabot/'))
111- uses : aws-actions/configure-aws-credentials@8df5847569e6427dd6c4fb1cf565c83acfa8afa7
120+ uses : aws-actions/configure-aws-credentials@ec61189d14ec14c8efccab744f656cffd0e33f37
112121 with :
113122 aws-region : ${{ env.AWS_REGION }}
114123 role-to-assume : ${{ secrets.AWS_CI_ROLE_ARN }}
@@ -124,7 +133,8 @@ jobs:
124133 GITHUB_TOKEN : ${{ github.token }}
125134 COVERAGE_PATH : integrations/amazon_bedrock
126135 SUBPROJECT_ID : amazon_bedrock-combined
127- COMMENT_ARTIFACT_NAME : coverage-comment-amazon_bedrock-combined
136+ MINIMUM_GREEN : 90
137+ MINIMUM_ORANGE : 60
128138
129139 - name : Run unit tests with lowest direct dependencies
130140 if : github.event_name != 'push'
0 commit comments