You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running a Maester using the Github Action with a view to only run the Entra ID SCA tests the job runs but at the end of the run the upload fails with an error due to the size of the Markdown file
Github Actions output snippet
WARNING: The version '5.6.1' of module 'Pester' is currently in use. Retry the operation after closing the applications.
Pester verbosity level set to: None
Running tests with tags: EIDSCA
███╗ ███╗ █████╗ ███████╗███████╗████████╗███████╗██████╗ ██╗ ██╗ ██╗ ██████╗
████╗ ████║██╔══██╗██╔════╝██╔════╝╚══██╔══╝██╔════╝██╔══██╗ ██║ ██║███║ ██╔═████╗
██╔████╔██║███████║█████╗ ███████╗ ██║ █████╗ ██████╔╝ ██║ ██║╚██║ ██║██╔██║
██║╚██╔╝██║██╔══██║██╔══╝ ╚════██║ ██║ ██╔══╝ ██╔══██╗ ╚██╗ ██╔╝ ██║ ████╔╝██║
██║ ╚═╝ ██║██║ ██║███████╗███████║ ██║ ███████╗██║ ██║ ╚████╔╝ ██║██╗╚██████╔╝
╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚══════╝ ╚═╝ ╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝╚═╝ ╚═════╝
🔥 Maester test report generated at test-results/test-results.html
Tests Passed ✅: 63, Failed ❌: 15, Skipped ⚫: 9
Script execution Complete
Error: $GITHUB_STEP_SUMMARY upload aborted, supports content up to a size of 1024k, got 7872k. For more information see: https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-markdown-summary
I have recently switched from using the original v0.1 github action to the published one which has resulted in the error.
The code used in the Github Action yml is as follows
name: Entra ID Secure Config Analyseron:
#push:# branches: ["main"]# Run once a day at midnightschedule:
- cron: "0 0 * * *"# Allows to run this workflow manually from the Actions tabworkflow_dispatch:
permissions:
id-token: writecontents: readchecks: writejobs:
run-maester-tests:
name: Run Maester Testsruns-on: ubuntu-lateststeps:
- name: Run Maester actionuses: maester365/maester@mainwith:
client_id: ${{ secrets.AZURE_CLIENT_ID }}tenant_id: ${{ secrets.AZURE_TENANT_ID }}include_tags: "EIDSCA"include_public_tests: true
By comparison I have the original Maester tests using a separate action
name: Maester Daily Testson:
#push:# branches: ["main"]# Run once a day at midnightschedule:
- cron: "0 0 * * *"# Allows to run this workflow manually from the Actions tabworkflow_dispatch:
permissions:
id-token: writecontents: readchecks: writejobs:
run-maester-tests:
name: Run Maester Testsruns-on: ubuntu-lateststeps:
- name: Run Maester actionuses: maester365/maester@mainwith:
client_id: ${{ secrets.AZURE_CLIENT_ID }}tenant_id: ${{ secrets.AZURE_TENANT_ID }}include_tags: "Maester"include_public_tests: false
The only changes being the with section has different include_tags and include_public_tests but changing the second from true to false doesn't resolve the issue just produce a smaller output file.
Looking at the contents of the Markdown that is published it is now much larger and is adding the Test Results summary multiple times at the end of the MD file (125 times when running include_tags: EIDSCA and include_public_tests: true and 52 tiles with include_public_tests: false). By comparison the logic for include_tags: Maester does not appear to produce the same errors
Reverting to the original GithubAction where all the code is run from the yml in my repo it completes without issue
name: Entra ID Secure Configon:
#push:# branches: ["main"]# Run once a day at midnightschedule:
- cron: "0 0 * * *"# Allows to run this workflow manually from the Actions tabworkflow_dispatch:
permissions:
id-token: writecontents: readchecks: writejobs:
run-maester-tests:
name: Run Maester Testsruns-on: ubuntu-lateststeps:
- uses: actions/checkout@v4
- name: Set current date as env variablerun: echo "NOW=$(date +'%Y-%m-%d-T%H%M%S')" >> $GITHUB_ENV
- name: 'Az CLI login'uses: azure/login@v2with:
tenant-id: ${{ secrets.AZURE_TENANT_ID }}client-id: ${{ secrets.AZURE_CLIENT_ID }}allow-no-subscriptions: true
- name: Run Maesteruses: azure/powershell@v2with:
inlineScript: | # Get Token $token = az account get-access-token --resource-type ms-graph # Connect to Microsoft Graph $accessToken = ($token | ConvertFrom-Json).accessToken | ConvertTo-SecureString -AsPlainText -Force Connect-MgGraph -AccessToken $accessToken # Install Maester Install-Module Maester -Force # Configure test results $PesterConfiguration = New-PesterConfiguration $PesterConfiguration.Output.Verbosity = 'None' # Run Maester tests $results = Invoke-Maester -Path tests/EIDSCA/ -PesterConfiguration $PesterConfiguration -OutputFolder test-results -OutputFolderFileName "test-results" -PassThru # Add step summary $summary = Get-Content test-results/test-results.md Add-Content -Path $env:GITHUB_STEP_SUMMARY -Value $summary # Flag status to GitHub - Uncomment the block below to fail the build if tests fail #if ($results.Result -ne 'Passed'){ # Write-Error "Status = $($results.Result): See Maester Test Report below for details." #}azPSVersion: "latest"
- name: Archive Maester Html Reportuses: actions/upload-artifact@v4if: always()with:
name: maester-test-results-${{ env.NOW }}path: test-results
I can't see why the logic should fail when the tests are being run from the public repo rather than locally and when EIDSCA is used as the tag
The text was updated successfully, but these errors were encountered:
Interestingly trying to use the same logic on the CIS E3 tag I get an even bigger error when the upload is attempted
WARNING: The version '5.6.1' of module 'Pester' is currently in use. Retry the operation after closing the applications.
Pester verbosity level set to: None
Running tests with tags: CIS E3
███╗ ███╗ █████╗ ███████╗███████╗████████╗███████╗██████╗ ██╗ ██╗ ██╗ ██████╗
████╗ ████║██╔══██╗██╔════╝██╔════╝╚══██╔══╝██╔════╝██╔══██╗ ██║ ██║███║ ██╔═████╗
██╔████╔██║███████║█████╗ ███████╗ ██║ █████╗ ██████╔╝ ██║ ██║╚██║ ██║██╔██║
██║╚██╔╝██║██╔══██║██╔══╝ ╚════██║ ██║ ██╔══╝ ██╔══██╗ ╚██╗ ██╔╝ ██║ ████╔╝██║
██║ ╚═╝ ██║██║ ██║███████╗███████║ ██║ ███████╗██║ ██║ ╚████╔╝ ██║██╗╚██████╔╝
╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚══════╝ ╚═╝ ╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝╚═╝ ╚═════╝
WARNING: Skipping eligible roles as required Graph permission 'RoleEligibilitySchedule.ReadWrite.Directory' was not present.
WARNING: Skipping eligible roles as required Graph permission 'RoleEligibilitySchedule.ReadWrite.Directory' was not present.
🔥 Maester test report generated at test-results/test-results.html
Tests Passed ✅: 2, Failed ❌: 2, Skipped ⚫: 14
Script execution Complete
Error: $GITHUB_STEP_SUMMARY upload aborted, supports content up to a size of 1024k, got 10557k. For more information see: https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-markdown-summary
MattWhite-personal
changed the title
Running Github Action with only one test set throws error about size of Markdown results
Running Github Action with only one include_tag set throws error about size of Markdown results
Jan 2, 2025
When running a Maester using the Github Action with a view to only run the Entra ID SCA tests the job runs but at the end of the run the upload fails with an error due to the size of the Markdown file
Github Actions output snippet
I have recently switched from using the original v0.1 github action to the published one which has resulted in the error.
The code used in the Github Action yml is as follows
By comparison I have the original Maester tests using a separate action
The only changes being the
with
section has differentinclude_tags
andinclude_public_tests
but changing the second from true to false doesn't resolve the issue just produce a smaller output file.Looking at the contents of the Markdown that is published it is now much larger and is adding the Test Results summary multiple times at the end of the MD file (125 times when running
include_tags: EIDSCA
andinclude_public_tests: true
and 52 tiles withinclude_public_tests: false
). By comparison the logic forinclude_tags: Maester
does not appear to produce the same errorsReverting to the original GithubAction where all the code is run from the yml in my repo it completes without issue
I can't see why the logic should fail when the tests are being run from the public repo rather than locally and when EIDSCA is used as the tag
The text was updated successfully, but these errors were encountered: