1- # Copyright 2025 Collate
1+ # Copyright 2021 Collate
22# Licensed under the Apache License, Version 2.0 (the "License");
33# you may not use this file except in compliance with the License.
44# You may obtain a copy of the License at
99# See the License for the specific language governing permissions and
1010# limitations under the License.
1111
12- # This workflow executes SSO-specific end-to-end (e2e) tests using Playwright with MySQL as the database.
13- #
14- # Purpose:
15- # - Run SSO configuration tests for various authentication providers (Google, Azure AD, Okta, SAML, LDAP, etc.)
16- # - Validate SSO provider selection, field visibility, and configuration workflows
17- # - Tests are tagged with @sso and run in isolation from other Playwright tests
18- #
19- # Triggers:
20- # - Manual trigger via workflow_dispatch
21- # - Pull requests with "safe to test" label
22- # - Excludes draft PRs
23- #
24- # Test Location:
25- # - openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/SSOConfiguration.spec.ts
26- #
27- # For more information see: https://github.com/actions/setup-java/blob/main/docs/advanced-usage.md#apache-maven-with-a-settings-path
12+ # This workflow runs SSO authentication tests nightly to verify SSO providers are working correctly.
13+ # Tests are excluded from regular Playwright runs to avoid requiring SSO credentials for all CI/CD.
2814
2915name : SSO Authentication Tests (Nightly)
3016
31- # schedule:
17+ on :
18+ # schedule:
3219 # # Run every night at 2 AM UTC
33- # - cron: '0 2 * * *'
20+ # - cron: '0 2 * * *'s
3421 workflow_dispatch : # Allow manual trigger
3522 inputs :
3623 sso_provider :
@@ -45,6 +32,7 @@ name: SSO Authentication Tests (Nightly)
4532 - auth0
4633 - saml
4734 - cognito
35+ - all
4836
4937permissions :
5038 contents : read
@@ -56,7 +44,7 @@ concurrency:
5644jobs :
5745 sso-auth-tests :
5846 runs-on : ubuntu-latest
59- if : ${{ !github.event.pull_request.draft }}
47+ timeout-minutes : 90
6048 environment : test
6149
6250 strategy :
7664 swap-storage : true
7765 docker-images : false
7866
79- - name : Wait for the labeler
80- uses : lewagon/wait-on-check-action@v1.3.4
81- if : ${{ github.event_name == 'pull_request_target' }}
82- with :
83- ref : ${{ github.event.pull_request.head.sha }}
84- check-name : Team Label
85- repo-token : ${{ secrets.GITHUB_TOKEN }}
86- wait-interval : 90
87-
88- - name : Verify PR labels
89- uses : jesusvasquez333/verify-pr-label-action@v1.4.0
90- if : ${{ github.event_name == 'pull_request_target' }}
91- with :
92- github-token : " ${{ secrets.GITHUB_TOKEN }}"
93- valid-labels : " safe to test"
94- pull-request-number : " ${{ github.event.pull_request.number }}"
95- disable-reviews : true # To not auto approve changes
96-
9767 - name : Checkout
9868 uses : actions/checkout@v4
99- with :
100- ref : ${{ github.event.pull_request.head.sha }}
10169
10270 - name : Cache Maven Dependencies
10371 id : cache-output
10876 restore-keys : |
10977 ${{ runner.os }}-maven-
11078
111- - name : Setup Openmetadata Test Environment
79+ - name : Setup OpenMetadata Test Environment
11280 uses : ./.github/actions/setup-openmetadata-test-environment
11381 with :
11482 python-version : " 3.10"
@@ -119,14 +87,14 @@ jobs:
11987 - name : Setup Node.js
12088 uses : actions/setup-node@v4
12189 with :
122- node-version-file : ' openmetadata-ui/src/main/resources/ui/.nvmrc'
90+ node-version-file : " openmetadata-ui/src/main/resources/ui/.nvmrc"
12391
124- - name : Install dependencies
125- working-directory : openmetadata-ui/src/main/resources/ui/
92+ - name : Install UI dependencies
93+ working-directory : openmetadata-ui/src/main/resources/ui
12694 run : yarn --ignore-scripts --frozen-lockfile
12795
12896 - name : Install Playwright Browsers
129- run : npx playwright@1.51.1 install --with-deps
97+ run : npx playwright@1.51.1 install --with-deps chromium
13098
13199 - name : Run SSO Authentication Tests
132100 working-directory : openmetadata-ui/src/main/resources/ui
@@ -145,14 +113,23 @@ jobs:
145113 with :
146114 name : sso-auth-test-results-${{ matrix.provider }}
147115 path : openmetadata-ui/src/main/resources/ui/playwright/output/playwright-report
148- retention-days : 5
116+ retention-days : 7
117+
118+ - name : Upload test traces
119+ if : failure()
120+ uses : actions/upload-artifact@v4
121+ with :
122+ name : sso-auth-test-traces-${{ matrix.provider }}
123+ path : openmetadata-ui/src/main/resources/ui/playwright/output/test-results/**/trace.zip
124+ retention-days : 7
149125
150126 - name : Clean Up
127+ if : always()
151128 run : |
152129 cd ./docker/development
153130 docker compose down --remove-orphans
154131 sudo rm -rf ${PWD}/docker-volume
155-
132+
156133 notify :
157134 needs : sso-auth-tests
158135 runs-on : ubuntu-latest
0 commit comments