Skip to content

Commit

Permalink
Updated CI workflow to handle permissions for PRs with full write access
Browse files Browse the repository at this point in the history
  • Loading branch information
TeamSPoon committed Aug 15, 2024
1 parent 8c61240 commit 1f9fd48
Showing 1 changed file with 13 additions and 12 deletions.
25 changes: 13 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ on:
- main

permissions:
contents: read # Read contents is usually sufficient for most operations
contents: write # Grant write permissions for contents
checks: write # Grant write permissions for checks
pull-requests: write # Explicitly grant write permissions for pull requests

jobs:
Expand All @@ -33,41 +34,41 @@ jobs:
run: chmod +x scripts/run_commit_tests.sh

- name: Run Shell Script to Generate Input File
continue-on-error: true
continue-on-error: true # extra: Continue even if this step fails
run: |
./scripts/run_commit_tests.sh
- name: Run JUnit Report Generation Script
continue-on-error: true
continue-on-error: true # extra: Continue even if this step fails
run: |
python scripts/into_junit.py /tmp/SHARED.UNITS > junit.xml
- name: Convert JUnit XML to Standard HTML Report
continue-on-error: true
continue-on-error: true # extra: Continue even if this step fails
run: |
junit2html junit.xml junit-standard-report.html
- name: Convert JUnit XML to Matrix HTML Report
continue-on-error: true
continue-on-error: true # extra: Continue even if this step fails
run: |
junit2html --report-matrix junit.xml junit-matrix-report.html
- name: Upload JUnit XML Report
continue-on-error: true
continue-on-error: true # extra: Continue even if this step fails
uses: actions/upload-artifact@v3
with:
name: junit-report
path: junit.xml

- name: Upload Standard HTML Report
continue-on-error: true
continue-on-error: true # extra: Continue even if this step fails
uses: actions/upload-artifact@v3
with:
name: junit-standard-html-report
path: junit-standard-report.html

- name: Upload Matrix HTML Report
continue-on-error: true
continue-on-error: true # extra: Continue even if this step fails
uses: actions/upload-artifact@v3
with:
name: junit-matrix-html-report
Expand All @@ -79,10 +80,10 @@ jobs:
name: 'JUnit Results'
path: 'junit.xml'
reporter: 'java-junit'
fail-on-error: false
fail-on-error: false # Do not fail the job if tests fail

- name: Download Previous JUnit Results
continue-on-error: true
continue-on-error: true # extra: Continue even if this step fails
uses: actions/download-artifact@v3
with:
name: junit-report
Expand All @@ -97,7 +98,7 @@ jobs:
reportgenerator -reports:"previous-junit.xml;junit.xml" -targetdir:"./comparison-report" -reporttypes:"HtmlSummary;HtmlChart"
- name: Upload JUnit Comparison Report
continue-on-error: true
continue-on-error: true # extra: Continue even if this step fails
uses: actions/upload-artifact@v3
with:
name: junit-comparison-html-report
Expand All @@ -123,7 +124,7 @@ jobs:
allure generate --clean --output ./allure-report ./allure-results
- name: Upload Allure Report as Artifact
continue-on-error: true
continue-on-error: true # extra: Continue even if this step fails
uses: actions/upload-artifact@v3
with:
name: allure-html-report
Expand Down

0 comments on commit 1f9fd48

Please sign in to comment.