Nightly Unit Test Execution #50
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Nightly Unit Test Execution | |
| on: | |
| schedule: | |
| - cron: "0 2 * * *" # Runs every night at 2 AM UTC | |
| workflow_dispatch: # Allows manual triggering | |
| permissions: | |
| contents: read # Required for checking out private repositories | |
| jobs: | |
| send-email: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout Repository | |
| uses: actions/checkout@v4 | |
| - name: Create Dummy Test Report | |
| run: echo "Nightly test execution skipped. This is a test email." > test-results.txt | |
| - name: Send Email Notification | |
| uses: dawidd6/action-send-mail@v3 | |
| with: | |
| server_address: smtp.gmail.com # Change for other providers | |
| server_port: 465 | |
| username: ${{ secrets.EMAIL_USER }} | |
| password: ${{ secrets.EMAIL_PASS }} | |
| subject: "Nightly Test Report - ${{ github.repository }}" | |
| to: "recipient@example.com" | |
| from: "GitHub Actions <your-email@example.com>" | |
| body: | | |
| This is a test email from GitHub Actions. | |
| Unit tests were skipped for debugging the workflow. | |
| attachments: test-results.txt |