Skip to content

Commit

Permalink
config-comment-test.yml: Move check-checksum out
Browse files Browse the repository at this point in the history
  • Loading branch information
CodeGat committed Oct 17, 2024
1 parent 762b047 commit c958cf5
Showing 1 changed file with 12 additions and 46 deletions.
58 changes: 12 additions & 46 deletions .github/workflows/config-comment-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ jobs:
exit 1
fi
repro:
repro-ci:
name: Compare ${{ needs.prepare-command.outputs.config-ref }} against ${{ needs.prepare-command.outputs.compared-config-ref }}
needs:
- prepare-command
Expand All @@ -225,54 +225,22 @@ jobs:
secrets: inherit
permissions:
contents: write
checks: write

check-repro:
# Parse the test report and return pass/fail result
comment-repro:
# Comment the result of the repro checks
name: Results
needs:
- prepare-command
- repro
- repro-ci
runs-on: ubuntu-latest
env:
TESTING_LOCAL_LOCATION: /opt/testing
permissions:
pull-requests: write
checks: write
outputs:
result: ${{ steps.results.outputs.result }}
steps:
- name: Download Newly Created Checksum
uses: actions/download-artifact@v4
with:
name: ${{ needs.repro.outputs.artifact-name }}
path: ${{ env.TESTING_LOCAL_LOCATION }}

- name: Parse Test Report
id: tests
uses: EnricoMi/publish-unit-test-result-action/composite@82082dac68ad6a19d980f8ce817e108b9f496c2a #v2.17.1
with:
files: ${{ env.TESTING_LOCAL_LOCATION }}/checksum/test_report.xml
comment_mode: off
check_run: true
compare_to_earlier_commit: false
report_individual_runs: true
report_suite_logs: any

- name: Repro results
id: results
run: |
echo "check-url=${{ fromJson(steps.tests.outputs.json).check_url }}" >> $GITHUB_OUTPUT
if (( ${{ fromJson(steps.tests.outputs.json).stats.tests_fail }} > 0 )); then
echo "result=fail" >> $GITHUB_OUTPUT
else
echo "result=pass" >> $GITHUB_OUTPUT
fi
- name: Comment result
env:
RESULT: |-
${{ steps.results.outputs.result == 'pass' && ':white_check_mark: The Bitwise Reproducibility Check Succeeded :white_check_mark:' || ':x: The Bitwise Reproducibility Check Failed :x:' }}
${{ needs.repro-ci.outputs.result == 'pass' && ':white_check_mark: The Bitwise Reproducibility Check Succeeded :white_check_mark:' || ':x: The Bitwise Reproducibility Check Failed :x:' }}
CONFIG_REF_URL: '[${{ needs.prepare-command.outputs.config-short-hash }}](${{ github.server_url}}/${{ github.repository }}/tree/${{ needs.prepare-command.outputs.config-hash }})'
COMPARED_CONFIG_REF_URL: '[${{ needs.prepare-command.outputs.compared-config-short-hash }}](${{ github.server_url }}/${{ github.repository }}/tree/${{ needs.prepare-command.outputs.compared-config-hash }})'
uses: access-nri/actions/.github/actions/pr-comment@main
Expand All @@ -285,26 +253,25 @@ jobs:
- `${{ needs.prepare-command.outputs.config-ref }}` (checksums created using commit ${{ env.CONFIG_REF_URL }}), against
- `${{ needs.prepare-command.outputs.compared-config-ref }}` (checksums in commit ${{ env.COMPARED_CONFIG_REF_URL }})
${{ (needs.prepare-command.outputs.commit-requested == 'true' && steps.results.outputs.result == 'fail') && ':wrench: The checksums will be committed to this PR, as they differ.' || '' }}
${{ (needs.prepare-command.outputs.commit-requested == 'true' && needs.repro-ci.outputs.result == 'fail') && ':wrench: The checksums will be committed to this PR, as they differ.' || '' }}
<details>
<summary> Further information</summary>
The experiment can be found on Gadi at `${{ needs.repro.outputs.experiment-location }}`, and the test results at ${{ steps.results.outputs.check-run-url }}.
The experiment can be found on Gadi at `${{ needs.repro-ci.outputs.experiment-location }}`, and the test results at ${{ needs.repro-ci.outputs.check-run-url }}.
The checksums generated by this `!test` command are found in the `testing/checksum` directory of ${{ needs.repro.outputs.artifact-url }}.
The checksums generated by this `!test` command are found in the `testing/checksum` directory of ${{ needs.repro-ci.outputs.artifact-url }}.
The checksums compared against are found here ${{ github.server_url }}/${{ github.repository }}/tree/${{ needs.prepare-command.outputs.compared-config-hash }}/testing/checksum
</details>
commit:
name: Commit Result
if: needs.prepare-command.outputs.commit-requested == 'true' && needs.check-repro.outputs.result == 'fail'
if: needs.prepare-command.outputs.commit-requested == 'true' && needs.repro-ci.outputs.result == 'fail'
needs:
- prepare-command
- repro
- check-repro
- repro-ci
runs-on: ubuntu-latest
permissions:
contents: write
Expand All @@ -326,7 +293,7 @@ jobs:
- name: Download Newly Created Checksum
uses: actions/download-artifact@v4
with:
name: ${{ needs.repro.outputs.artifact-name }}
name: ${{ needs.repro-ci.outputs.artifact-name }}
path: ${{ env.ARTIFACT_LOCAL_LOCATION }}

- name: Update files
Expand Down Expand Up @@ -360,7 +327,6 @@ jobs:
needs:
- permission-check
- prepare-command
- check-repro
- commit
if: failure()
runs-on: ubuntu-latest
Expand Down

0 comments on commit c958cf5

Please sign in to comment.