Skip to content

Commit 9bef0de

Browse files
authored
Merge branch 'main' into feature/openmetadata-dsl
2 parents 6236aa0 + d0362d1 commit 9bef0de

781 files changed

Lines changed: 58254 additions & 13224 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 145 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,145 @@
1+
# Copyright 2025 Collate
2+
# Licensed under the Apache License, Version 2.0 (the "License");
3+
# you may not use this file except in compliance with the License.
4+
# You may obtain a copy of the License at
5+
# http://www.apache.org/licenses/LICENSE-2.0
6+
# Unless required by applicable law or agreed to in writing, software
7+
# distributed under the License is distributed on an "AS IS" BASIS,
8+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
9+
# See the License for the specific language governing permissions and
10+
# limitations under the License.
11+
12+
name: SSO Login Nightly
13+
14+
on:
15+
schedule:
16+
- cron: '0 3 * * *'
17+
workflow_dispatch:
18+
inputs:
19+
sso_provider:
20+
description: 'SSO provider (or "all")'
21+
required: true
22+
default: okta
23+
type: choice
24+
options:
25+
- okta
26+
- keycloak-azure-saml
27+
- all
28+
29+
permissions:
30+
contents: read
31+
32+
concurrency:
33+
group: sso-login-nightly-${{ github.event.inputs.sso_provider || 'scheduled' }}
34+
cancel-in-progress: true
35+
36+
jobs:
37+
# To onboard a new provider:
38+
# 1. Add a matrix entry below (`name` is the lowercase provider id used by
39+
# the Playwright helper; `env_prefix` is the uppercase/underscore form
40+
# used to look up credentials). Also add `name` to the dispatch
41+
# `options:` list above.
42+
# 2. Add <ENV_PREFIX>_SSO_USERNAME (variable) and <ENV_PREFIX>_SSO_PASSWORD
43+
# (variable) to the `test` environment. Use a secret instead of a
44+
# variable for the password if the provider uses a real (non-fixture)
45+
# credential.
46+
# 3. Register the helper in playwright/utils/sso-providers/index.ts.
47+
sso-login:
48+
runs-on: ubuntu-latest
49+
environment: test
50+
timeout-minutes: 45
51+
strategy:
52+
fail-fast: false
53+
matrix:
54+
provider:
55+
${{ (github.event_name == 'schedule' || github.event.inputs.sso_provider == 'all')
56+
&& fromJSON('[{"name":"okta","env_prefix":"OKTA"},{"name":"keycloak-azure-saml","env_prefix":"KEYCLOAK_AZURE_SAML"}]')
57+
|| (github.event.inputs.sso_provider == 'keycloak-azure-saml'
58+
&& fromJSON('[{"name":"keycloak-azure-saml","env_prefix":"KEYCLOAK_AZURE_SAML"}]')
59+
|| fromJSON('[{"name":"okta","env_prefix":"OKTA"}]')) }}
60+
steps:
61+
- name: Free Disk Space (Ubuntu)
62+
uses: jlumbroso/free-disk-space@main
63+
with:
64+
tool-cache: false
65+
android: true
66+
dotnet: true
67+
haskell: true
68+
large-packages: false
69+
swap-storage: true
70+
docker-images: false
71+
72+
- name: Checkout
73+
uses: actions/checkout@v4
74+
75+
- name: Cache Maven Dependencies
76+
uses: actions/cache@v4
77+
with:
78+
path: ~/.m2
79+
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
80+
restore-keys: |
81+
${{ runner.os }}-maven-
82+
83+
- name: Setup OpenMetadata Test Environment
84+
uses: ./.github/actions/setup-openmetadata-test-environment
85+
with:
86+
python-version: '3.10'
87+
args: '-d postgresql -i false'
88+
ingestion_dependency: 'all'
89+
90+
- name: Setup Node.js
91+
uses: actions/setup-node@v4
92+
with:
93+
node-version-file: 'openmetadata-ui/src/main/resources/ui/.nvmrc'
94+
95+
- name: Install dependencies
96+
working-directory: openmetadata-ui/src/main/resources/ui/
97+
run: yarn --ignore-scripts --frozen-lockfile
98+
99+
- name: Install Playwright Browsers
100+
run: npx playwright@1.57.0 install chromium --with-deps
101+
102+
- name: Start Keycloak SAML IdP
103+
if: startsWith(matrix.provider.name, 'keycloak-')
104+
run: |
105+
docker compose -f docker/local-sso/keycloak-saml/docker-compose.yml up -d
106+
timeout 180 bash -c 'until curl -fsS http://localhost:8080/realms/om-azure-saml >/dev/null; do sleep 2; done'
107+
108+
- name: Run SSO Login Spec
109+
working-directory: openmetadata-ui/src/main/resources/ui
110+
env:
111+
SSO_PROVIDER_TYPE: ${{ matrix.provider.name }}
112+
SSO_USERNAME: ${{ vars[format('{0}_SSO_USERNAME', matrix.provider.env_prefix)] }}
113+
SSO_PASSWORD: ${{ vars[format('{0}_SSO_PASSWORD', matrix.provider.env_prefix)] || secrets[format('{0}_SSO_PASSWORD', matrix.provider.env_prefix)] }}
114+
KEYCLOAK_SAML_BASE_URL: http://localhost:8080
115+
PLAYWRIGHT_IS_OSS: true
116+
run: |
117+
npx playwright test playwright/e2e/Auth/SSOLogin.spec.ts \
118+
--project=sso-auth \
119+
--workers=1
120+
121+
- name: Upload HTML report
122+
if: always()
123+
uses: actions/upload-artifact@v4
124+
with:
125+
name: sso-login-html-report-${{ matrix.provider.name }}
126+
path: openmetadata-ui/src/main/resources/ui/playwright/output/playwright-report
127+
retention-days: 5
128+
129+
- name: Send Slack Notification
130+
if: always()
131+
working-directory: openmetadata-ui/src/main/resources/ui
132+
env:
133+
RUN_TITLE: "SSO Login Nightly: ${{ matrix.provider.name }} (${{ github.ref_name }})"
134+
RUN_URL: "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
135+
SLACK_BOT_USER_OAUTH_TOKEN: ${{ secrets.E2E_SLACK_BOT_OAUTH_TOKEN }}
136+
run: |
137+
npx playwright-slack-report -c playwright/slack-cli.config.json -j playwright/output/results.json > slack_report.json
138+
139+
- name: Clean Up
140+
if: always()
141+
run: |
142+
docker compose -f docker/local-sso/keycloak-saml/docker-compose.yml down --remove-orphans || true
143+
cd ./docker/development
144+
docker compose down --remove-orphans
145+
sudo rm -rf ${PWD}/docker-volume

0 commit comments

Comments
 (0)