Nightly UI Tests #172
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 UI Tests | |
| on: | |
| schedule: | |
| - cron: "0 2 * * *" | |
| workflow_dispatch: | |
| jobs: | |
| ui-tests: | |
| name: Run UI Tests | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| ref: main | |
| - name: Set up Python | |
| uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0 | |
| with: | |
| python-version: "3.14" | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@11f9893b081a58869d3b5fccaea48c9e9e46f990 # v8.3.2 | |
| - name: Install dependencies | |
| working-directory: tests | |
| run: uv sync | |
| - name: Install Playwright browsers | |
| working-directory: tests | |
| run: uv run playwright install chromium --with-deps | |
| - name: Run tests | |
| working-directory: tests | |
| env: | |
| RHDH_BASE_URL: ${{ secrets.RHDH_BASE_URL }} | |
| RHDH_ENVIRONMENT: ${{ secrets.RHDH_ENVIRONMENT }} | |
| ROLLING_DEMO_TEST_USERNAME: ${{ secrets.ROLLING_DEMO_TEST_USERNAME }} | |
| KEYCLOAK_CLIENT_ID: ${{ secrets.KEYCLOAK_CLIENT_ID }} | |
| KEYCLOAK_CLIENT_SECRET: ${{ secrets.KEYCLOAK_CLIENT_SECRET }} | |
| run: uv run pytest -v | |
| - name: Notify Slack on failure | |
| if: failure() | |
| run: | | |
| curl -s -X POST "${{ secrets.SLACK_WEBHOOK_URL }}" \ | |
| -H "Content-Type: application/json" \ | |
| --data-binary '{ | |
| "text": "*<${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|[FIRING] NightlyRollingDemoTestsFailed>*", | |
| "attachments": [ | |
| { | |
| "color": "#FF0000", | |
| "fields": [ | |
| { | |
| "title": "Summary", | |
| "value": "Nightly UI tests failed on the `main` branch.", | |
| "short": false | |
| }, | |
| { | |
| "title": "Description", | |
| "value": "One or more tests failed.", | |
| "short": false | |
| }, | |
| { | |
| "title": "Severity", | |
| "value": "critical", | |
| "short": true | |
| } | |
| ] | |
| } | |
| ] | |
| }' |