Skip to content

The scheduled run of the Playwright Tests #44

The scheduled run of the Playwright Tests

The scheduled run of the Playwright Tests #44

Workflow file for this run

name: The scheduled run of the Playwright Tests
# this workflow will be run on pushing and on pulling code to the main branch
#cron job
on:
schedule:
- cron: '0 23 * * *'
jobs:
playwright: #job name
name: 'Playwright Tests'
runs-on: ubuntu-latest
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK }} #slack config
container:
image: mcr.microsoft.com/playwright/java:v1.49.0-noble
options: --user 1001
steps:
#actions
- uses: actions/checkout@v4
- uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'
#step 1 maven installation
- name: Install maven
run: mvn install
#step2 run the tests
- name: Run tests
run: mvn test
#step3 generate the extent report
- name: Upload Extent Report
uses: actions/upload-artifact@v4
with:
name: extent-report
path: src/test/reports/HTML-ExecutionReport.html
#step4 send notification to slack channel "testingExecutionResult"
- name: Notify Slack
uses: act10ns/slack@v2
with:
status: ${{ job.status }}
channel: '#all-testingexecutionresult'
steps: ${{ toJson(steps) }}
if: always()