Skip to content

Nightly Unit Test Execution #62

Nightly Unit Test Execution

Nightly Unit Test Execution #62

Workflow file for this run

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