diff --git a/.github/workflows/integration-test.yml b/.github/workflows/integration-test.yml index ac1281a..bee7590 100644 --- a/.github/workflows/integration-test.yml +++ b/.github/workflows/integration-test.yml @@ -7,6 +7,9 @@ on: jobs: test: runs-on: ubuntu-latest + permissions: + contents: read + pull-requests: write steps: - uses: actions/checkout@v3 @@ -31,7 +34,7 @@ jobs: - name: Install Python dependencies run: pip install -r scripts/requirements.txt - - name: Build fuzzer in release mode + - name: Build fuzzer run: cargo build --release - name: Setup Sui environment @@ -44,4 +47,7 @@ jobs: - name: Display test report if: always() - run: cat test-report.md >> $GITHUB_STEP_SUMMARY + uses: marocchino/sticky-pull-request-comment@v2 + with: + path: test-report.md + header: move-fuzzer-test-report diff --git a/scripts/integration_test.py b/scripts/integration_test.py index cc77637..27f9fd9 100755 --- a/scripts/integration_test.py +++ b/scripts/integration_test.py @@ -678,23 +678,19 @@ def generate_report(self): console.print(table) # Generate Markdown report using Jinja2 - report_template = Template("""# Move Fuzzer Integration Test Report + report_template = Template("""## SUI Fuzzer Integration Test Report **Generated**: {{ timestamp }} **Package ID**: {{ package_id }} **Overall Result**: {{ "PASSED" if all_passed else "FAILED" }} -## Test Results +### Test Results | Test | Passed | Time | |------|--------|------| {%- for result in results %} | {{ result.name }} | {{ "✓" if result.passed else "✗" }} | {{ "%.1f"|format(result.execution_time) }}s | {%- endfor %} - -## Legend -- **Passed**: Test executed successfully and violations matched expectations -- **Time**: Test execution duration in seconds """) # Prepare template data