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

The mail is sent without the attachement #166

Open
Nawi98 opened this issue Jun 20, 2023 · 2 comments
Open

The mail is sent without the attachement #166

Nawi98 opened this issue Jun 20, 2023 · 2 comments
Labels
help wanted Extra attention is needed

Comments

@Nawi98
Copy link

Nawi98 commented Jun 20, 2023

Hello everyone !
The final aim of my worflow is to sent my artifact by mail :
Here is my workflow :
to_github

``

The mail is sent correctly but I do not see any attachment in it :
mail_sent

Any thought about it please?
Regards.

@dawidd6
Copy link
Owner

dawidd6 commented Jun 20, 2023

Is this windows runner? I haven't tested this action on windows at all.

@Nawi98
Copy link
Author

Nawi98 commented Jun 20, 2023

Hello @dawidd6 , I made some changes in my code, here it is now :

on: workflow_dispatch 
  
jobs:
  run_manual : # run my test
    runs-on: ubuntu-latest
    steps:
      - name: run the Testim s tests with Testim s gitHub action
        #id: tests_ok_ko
        uses: instinctstudios/testim-cli-gh-action@v0.6.0
        continue-on-error: true
        with:
          token: ${{ secrets.TESTIM_TOKEN }} 
          project: ${{ secrets.PROJECT_ID }} 
          grid: Testim-Grid
          suite: to_test_github_integration

      - name: upload the artifact generated by Testim itself
        uses: actions/upload-artifact@v3
        with:
          name: test_report
          path: /home/runner/work/launch_testim_tests/launch_testim_tests/testim-report.xml
          if-no-files-found: warn
    
      - name: parse the file
        run: cat /home/runner/work/launch_testim_tests/launch_testim_tests/testim-report.xml | grep -i -C 1 "<failure" | tee final-report.xml

      - name: Zip file
        uses: montudor/action-zip@v1
        with:
          args: zip -qq -r testim-report.zip . -i /home/runner/work/launch_testim_tests/launch_testim_tests/testim-report.xml

      #- name: Find the file
      #  run: find -name ./testim-report.zip -print
      
      - name: Find the file
        run: find ${{ github.workspace }} -name 'testim-report.zip' -print

      - name: Upload artifact
        uses: actions/upload-artifact@v2
        with:
          name: my-zip-artifact
          path: /home/runner/work/launch_testim_tests/launch_testim_tests/testim-report.zip

      - name: Checkout code
        uses: actions/checkout@v2

      - name: Send Email
        uses: dawidd6/action-send-mail@v3
        with:
          server_address: ${{ secrets.SMTP_SERVER }}
          server_port: ${{ secrets.SMTP_PORT }}
          secure: true
          username: ${{ secrets.MAIL }}
          password: ${{ secrets.PASSWORD }}
          subject: "XML File"
          to: myMail@gmail.com
          from: Testim User
          body: Please find the report of Testim tests attached.
          attachments: /home/runner/work/launch_testim_tests/launch_testim_tests/testim-report.zip

But unfortunately, the file is not received .

@dawidd6 dawidd6 added the help wanted Extra attention is needed label Aug 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants