Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No artifact recieved after update 0.3.0 #427

Open
Haakonak opened this issue Aug 26, 2024 · 7 comments
Open

No artifact recieved after update 0.3.0 #427

Haakonak opened this issue Aug 26, 2024 · 7 comments
Assignees

Comments

@Haakonak
Copy link

Hello Maester community! I have a question/problem with artifacts. After updating to the latest version 0.3.0 i no longer recieve an artifact after running Maester as an action.

I am using the given Maester as an Action script, with the modification of adding "mail_userid" and "mail_recipient".

jobs:
  run-maester-tests:
    name: Run Maester Tests
    runs-on: ubuntu-latest
    steps:
    - name: Run Maester action
      uses: maester365/maester@main
      with:
        client_id: ${{ secrets.AZURE_CLIENT_ID }}
        tenant_id: ${{ secrets.AZURE_TENANT_ID }}
        include_public_tests: false # Optional 
        pester_verbosity: 'None' # Optional - 'None', 'Normal', 'Detailed', 'Diagnostic'
        mail_userid: 'example.userid'
        mail_recipients: '[email protected]'

From the run logs, the parameter "artifact_upload" returns "true", but when looking through the summary there is no artifact.
I have attempted adding the "artifact_upload" parameter and manually setting it to "true" without any results. I have also tried to remove "mail_userid" and "mail_recipients" but still no artifact.

If anyone has any tips or info that could explain this issue to me i would be very grateful. If this does not qualify as an issue, i can post it in the Discussions forum instead.

@merill
Copy link
Contributor

merill commented Aug 27, 2024

Do you see the .html file being created?

@Haakonak
Copy link
Author

I compared my latest Maester run with a previous one which did produce an artifact, and the "actions/upload-artifact@v4" is skipped completely. However, right before displaying how many tests were run, passed and failed, it does seem like the .html is being created.

🔥 Maester test report generated at test-results/test-results.html

Tests Passed ✅: 74, Failed ❌: 39, Skipped ⚫: 22

Script execution Complete

@merill
Copy link
Contributor

merill commented Aug 28, 2024

@f-bader Could this be an issue with Github Action not uploading the artifact?

@f-bader f-bader self-assigned this Aug 29, 2024
@f-bader
Copy link
Contributor

f-bader commented Aug 29, 2024

Will check if there is a fail or something that prevents this. Should not happen

@albert-widjaja
Copy link

I also could not find the Artifact tab despite running it successfully.

image

@f-bader
Copy link
Contributor

f-bader commented Sep 9, 2024

Could this be related to https://github.com/actions/upload-artifact/releases/tag/v4.4.0

We will no longer include hidden files and folders by default in the upload-artifact action of this version. This reduces the risk that credentials are accidentally uploaded into artifacts. Customers who need to continue to upload these files can use a new option, include-hidden-files, to continue to do so.

@Haakonak
Copy link
Author

Haakonak commented Sep 11, 2024

This does seem like it could be whats causing this issue.

I am not well versed in testing and contributing to open source projects, but i assume an edited version of the "action.yml" file that looks like following could fix the issue.

- name: Archive Maester Html Report
      uses: actions/upload-artifact@v4
      if: ${{ inputs.artifact_upload == true }}
      with:
        name: maester-test-results-${{ env.NOW }}
        path: test-results
        include-hidden-files: true # Upload artifact to action summary

I have also had troubles with getting the mail_recipients parameter to work aswell, i think this might also be caused by the artifact not being uploaded as a default.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants