Enhance navigation with view transition in custom.css
#6598
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
| # This is the main CI workflow that includes both Python and UI tests | |
| name: CI | |
| # Controls when the action will run. | |
| on: | |
| # Triggers the workflow on push or pull request events but only for the main branch | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| types: | |
| - opened | |
| - reopened | |
| - synchronize | |
| - ready_for_review | |
| # Allows you to run this workflow manually from the Actions tab | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| # Prefix artifacts with PR number for pull requests (works for forks too) | |
| ARTIFACT_PREFIX: ${{ github.event.pull_request.number && format('pr-{0}-', github.event.pull_request.number) || '' }} | |
| # A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
| jobs: | |
| changed_files: | |
| runs-on: ubuntu-22.04 # windows-latest || macos-latest | |
| name: 👀 List Changed Files | |
| if: ${{ github.event.pull_request.draft == false }} | |
| outputs: | |
| api_reference_any_modified: ${{ steps.changed-files.outputs.api_reference_any_modified == 'true' }} | |
| evidently_any_modified: ${{ steps.changed-files.outputs.evidently_python_any_modified == 'true' }} | |
| ui_any_modified: ${{ steps.changed-files.outputs.ui_any_modified == 'true' }} | |
| ui_service_tests_need_run: ${{ steps.changed-files.outputs.evidently_python_any_modified == 'true' || steps.changed-files.outputs.ui_build_any_modified == 'true' }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Get all files that have changed | |
| id: changed-files | |
| uses: tj-actions/changed-files@v42 | |
| with: | |
| files_yaml: | | |
| api_reference: | |
| - .github/** | |
| - api-reference/** | |
| evidently_python: | |
| - .github/** | |
| - src/evidently/** | |
| - '!src/evidently/**/ui/**/assets/**' | |
| - '!src/evidently/nbextension/**' | |
| - example_test.py | |
| - examples/**/*.ipynb | |
| - requirements.dev.txt | |
| - requirements.min.txt | |
| - setup.py | |
| - setup.cfg | |
| - setupbase.py | |
| - pylintrc | |
| - tests/** | |
| ui: | |
| - .github/** | |
| - ui/** | |
| ui_build: | |
| - .github/** | |
| - src/evidently/**/ui/**/assets/** | |
| - src/evidently/nbextension/** | |
| - name: Run step if evidently_python file(s) change | |
| if: steps.changed-files.outputs.evidently_python_any_modified == 'true' | |
| run: | | |
| echo "One or more evidently_python file(s) has changed." | |
| echo "List all the files that have changed: ${{ steps.changed-files.outputs.evidently_python_all_changed_and_modified_files }}" | |
| - name: Run step if UI file(s) changed | |
| if: steps.changed-files.outputs.ui_any_modified == 'true' | |
| run: | | |
| echo "One or more ui file(s) has changed." | |
| echo "List all the files that have changed: ${{ steps.changed-files.outputs.ui_all_changed_and_modified_files }}" | |
| - name: Run step if API reference file(s) changed | |
| if: steps.changed-files.outputs.api_reference_any_modified == 'true' | |
| run: | | |
| echo "One or more api reference file(s) has changed." | |
| echo "List all the files that have changed: ${{ steps.changed-files.outputs.api_reference_all_changed_and_modified_files }}" | |
| - name: Run step if UI service tests need to be run | |
| if: steps.changed-files.outputs.evidently_python_any_modified == 'true' || steps.changed-files.outputs.ui_build_any_modified == 'true' | |
| run: | | |
| echo "UI service tests need to be run." | |
| echo "List all the files that have changed: ${{ steps.changed-files.outputs.ui_build_all_changed_and_modified_files }}" | |
| echo "List all the files that have changed: ${{ steps.changed-files.outputs.evidently_python_all_changed_and_modified_files }}" | |
| linter: | |
| # The type of runner that the job will run on | |
| runs-on: ubuntu-22.04 | |
| needs: changed_files | |
| if: ${{ needs.changed_files.outputs.evidently_any_modified == 'true' }} | |
| # Steps represent a sequence of tasks that will be executed as part of the job | |
| steps: | |
| # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.10" | |
| architecture: "x64" | |
| cache: "pip" | |
| cache-dependency-path: requirements.min.txt | |
| # Runs a single command using the runners shell | |
| - name: Install pytorch for linux | |
| run: pip install torch --index-url https://download.pytorch.org/whl/cpu | |
| - name: Install dependencies | |
| run: pip install -r requirements.min.txt && pip install -r requirements.dev.txt | |
| - name: Run pre-commit | |
| run: pre-commit run --all | |
| - name: Run Mypy | |
| run: mypy | |
| prepare-cache-data: | |
| name: Prepare cache data | |
| runs-on: ubuntu-22.04 | |
| needs: changed_files | |
| if: ${{ needs.changed_files.outputs.evidently_any_modified == 'true' }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: 🔍 Get bikes dataset cached | |
| uses: ./.github/share-actions/get-bikes-dataset-cached | |
| - name: 🔍 Get scipy dataset cached | |
| uses: ./.github/share-actions/get-scipy-datasets | |
| with: | |
| google_backend_sa_key: ${{ secrets.GOOGLE_BACKEND_SA_KEY }} | |
| test-minimal: | |
| name: Test on minimal requirements | |
| runs-on: ubuntu-22.04 | |
| needs: | |
| - changed_files | |
| - prepare-cache-data | |
| if: ${{ needs.changed_files.outputs.evidently_any_modified == 'true' }} | |
| env: | |
| EVIDENTLY_TEST_ENVIRONMENT: 1 | |
| SCIKIT_LEARN_DATA: scikit_learn_data | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.10" | |
| architecture: "x64" | |
| cache: "pip" | |
| cache-dependency-path: requirements.min.txt | |
| - name: Get scipy dataset cached | |
| uses: ./.github/share-actions/get-scipy-datasets | |
| - name: 🔍 Get bikes dataset cached | |
| uses: ./.github/share-actions/get-bikes-dataset-cached | |
| - name: Install pytorch for linux | |
| if: runner.os == 'Linux' && runner.arch == 'X64' | |
| run: pip install torch --index-url https://download.pytorch.org/whl/cpu | |
| - name: Update pip | |
| run: python -m pip install --upgrade pip | |
| - name: Install minimal dependencies | |
| run: pip install -r requirements.min.txt | |
| - name: Install package | |
| run: pip install -e .[dev,spark,fsspec,llm,sql] | |
| - name: Run Tests | |
| shell: bash | |
| run: | | |
| BRANCH_NAME="${{ github.event.pull_request.head.ref || github.ref_name }}" | |
| BRANCH_NAME="${BRANCH_NAME//\//-}" | |
| python -m pytest --durations=50 \ | |
| --html="pytest-reports/${{ env.ARTIFACT_PREFIX }}${BRANCH_NAME}/index.html" \ | |
| --self-contained-html | |
| - name: Upload HTML test report | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: pytest-html-report | |
| path: pytest-reports | |
| retention-days: 30 | |
| test: | |
| # The type of runner that the job will run on | |
| name: Test ${{ matrix.os }} with py${{ matrix.python }} | |
| env: | |
| EVIDENTLY_TEST_ENVIRONMENT: 1 | |
| SCIKIT_LEARN_DATA: scikit_learn_data | |
| needs: | |
| - linter | |
| - prepare-cache-data | |
| runs-on: ${{ matrix.os }} | |
| if: github.event.pull_request.draft == false | |
| strategy: | |
| matrix: | |
| os: [ubuntu-22.04, windows-2022, macos-14] | |
| python: ["3.10", "3.11", "3.12", "3.13"] | |
| exclude: | |
| - os: windows-2022 | |
| python: "3.13" | |
| fail-fast: false | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python }} | |
| cache: "pip" | |
| cache-dependency-path: pyproject.toml | |
| - name: Get scipy dataset cached | |
| uses: ./.github/share-actions/get-scipy-datasets | |
| - name: Install pytorch for linux | |
| if: runner.os == 'Linux' && runner.arch == 'X64' | |
| run: pip install torch --index-url https://download.pytorch.org/whl/cpu | |
| - name: 🔍 Get bikes dataset cached | |
| uses: ./.github/share-actions/get-bikes-dataset-cached | |
| - name: Install package | |
| run: pip install -e .[dev,spark,fsspec,llm,sql] | |
| - name: Run Tests | |
| run: python -m pytest --durations=50 | |
| python-build: | |
| # The type of runner that the job will run on | |
| name: Python build | |
| runs-on: ubuntu-22.04 | |
| needs: changed_files | |
| if: ${{ needs.changed_files.outputs.evidently_any_modified == 'true' }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.10" | |
| architecture: "x64" | |
| cache: "pip" | |
| cache-dependency-path: pyproject.toml | |
| - name: Install pytorch for linux | |
| if: runner.os == 'Linux' && runner.arch == 'X64' | |
| run: pip install torch --index-url https://download.pytorch.org/whl/cpu | |
| - name: Install dependencies | |
| run: pip install -e . | |
| - name: Install wheel | |
| run: pip install wheel | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v4 | |
| - name: Build package | |
| run: uv build | |
| - name: Archive built package | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: evidently-package-build-artifact | |
| path: dist/ | |
| generate-api-reference: | |
| name: Generate API reference documentation | |
| runs-on: ubuntu-22.04 | |
| needs: changed_files | |
| if: >- | |
| ${{ | |
| ( | |
| needs.changed_files.outputs.api_reference_any_modified == 'true' || | |
| needs.changed_files.outputs.evidently_any_modified == 'true' | |
| ) | |
| }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: 📚 Generate and upload API reference | |
| uses: ./.github/share-actions/generate-api-reference | |
| with: | |
| flags: >- | |
| --local-source-code | |
| --github-repo ${{ github.event.pull_request.head.repo.full_name || github.repository }} | |
| --git-revision ${{ github.event.pull_request.head.ref || github.ref_name }} | |
| --output-prefix '${{ env.ARTIFACT_PREFIX }}' | |
| - name: Upload documentation artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: api-reference | |
| path: api-reference/dist | |
| retention-days: 5 | |
| ui-build: | |
| name: UI build | |
| runs-on: ubuntu-22.04 | |
| needs: changed_files | |
| if: ${{ needs.changed_files.outputs.ui_any_modified == 'true' }} | |
| steps: | |
| - name: ⬇️ Checkout repo | |
| uses: actions/checkout@v4 | |
| - name: 📥 Install ui dependencies | |
| uses: ./.github/share-actions/ui-node-pnpm-install | |
| - name: 🔧 Build | |
| working-directory: ui | |
| run: pnpm build | |
| ui-code-check: | |
| name: UI code-check | |
| runs-on: ubuntu-22.04 | |
| needs: changed_files | |
| if: ${{ needs.changed_files.outputs.ui_any_modified == 'true' || needs.changed_files.outputs.evidently_any_modified == 'true' }} | |
| steps: | |
| - name: ⬇️ Checkout repo | |
| uses: actions/checkout@v4 | |
| - name: 📥 Install ui dependencies | |
| uses: ./.github/share-actions/ui-node-pnpm-install | |
| - name: 👌 Get types for UI | |
| uses: ./.github/share-actions/ui-types-from-backend | |
| - name: 🔬 Type check | |
| working-directory: ui | |
| run: pnpm type-check | |
| - name: 🔬 Check code quality | |
| working-directory: ui | |
| run: pnpm code-check | |
| ui-test: | |
| name: UI service tests | |
| runs-on: ubuntu-22.04 | |
| needs: changed_files | |
| if: ${{ needs.changed_files.outputs.ui_service_tests_need_run == 'true' }} | |
| steps: | |
| - name: ⬇️ Checkout repo | |
| uses: actions/checkout@v4 | |
| with: | |
| sparse-checkout: | | |
| ui | |
| .dvc | |
| .github | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| architecture: "x64" | |
| - name: Install Evidently | |
| run: pip install git+https://github.com/evidentlyai/evidently.git@${{ github.sha }} | |
| - name: Install dvc | |
| run: pip install 'pathspec<1' 'dvc[gs]==3.50.1' | |
| - name: Pull test data | |
| run: dvc pull | |
| - name: 📥 Install ui dependencies | |
| uses: ./.github/share-actions/ui-node-pnpm-install | |
| - name: Install Playwright Browsers | |
| working-directory: ui/service | |
| run: pnpm exec playwright install --with-deps chromium | |
| - name: 🔍 Get bikes dataset cached | |
| uses: ./.github/share-actions/get-bikes-dataset-cached | |
| - name: Create demo projects | |
| env: | |
| EXPERIMENTAL_DETERMINISTIC_UUID: "true" | |
| EVIDENTLY_TEST_ENVIRONMENT: 1 | |
| run: evidently demo_project --project bikes --path workspace-for-visual-testing | |
| - name: Run UI | |
| env: | |
| EXPERIMENTAL_DETERMINISTIC_UUID: "true" | |
| EVIDENTLY_TEST_ENVIRONMENT: 1 | |
| run: evidently ui --port 8000 --workspace workspace-for-visual-testing & | |
| - name: Wait UI to be ready to test | |
| working-directory: ui/service | |
| run: pnpm wait-on tcp:127.0.0.1:8000 -t 6m | |
| - name: Run Service Playwright tests | |
| working-directory: ui/service | |
| shell: bash | |
| run: | | |
| BRANCH_NAME="${{ github.event.pull_request.head.ref || github.ref_name }}" | |
| BRANCH_NAME="${BRANCH_NAME//\//-}" | |
| PLAYWRIGHT_HTML_REPORT="playwright-report/${{ env.ARTIFACT_PREFIX }}${BRANCH_NAME}" pnpm test | |
| - uses: actions/upload-artifact@v4 | |
| if: always() | |
| with: | |
| name: ui-service-playwright-report | |
| path: ui/service/playwright-report/ | |
| retention-days: 30 | |
| html-visual-testing: | |
| name: UI html visual tests | |
| runs-on: ubuntu-22.04 | |
| needs: changed_files | |
| if: ${{ needs.changed_files.outputs.evidently_any_modified == 'true' }} | |
| steps: | |
| - name: ⬇️ Checkout repo | |
| uses: actions/checkout@v4 | |
| - name: Install dvc | |
| run: pip install 'pathspec<1' 'dvc[gs]==3.50.1' | |
| - name: Pull test data | |
| run: dvc pull | |
| - name: 📥 Install ui dependencies | |
| uses: ./.github/share-actions/ui-node-pnpm-install | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.10" | |
| cache: "pip" | |
| cache-dependency-path: pyproject.toml | |
| - name: Install package | |
| run: pip install -e .[dev] | |
| - name: Install Playwright Browsers | |
| working-directory: ui/html-visual-testing | |
| run: pnpm exec playwright install --with-deps chromium | |
| - name: Convert jupyter notebooks to html files | |
| run: ./.github/scripts/jupyter-to-html.sh | |
| - name: Run server | |
| working-directory: ui/html-visual-testing | |
| run: npx serve -p 3001 dist & | |
| - name: Wait UI to be ready to test | |
| working-directory: ui/html-visual-testing | |
| run: pnpm wait-on tcp:127.0.0.1:3001 -t 1m | |
| - name: Run Service Playwright tests | |
| working-directory: ui/html-visual-testing | |
| shell: bash | |
| run: | | |
| BRANCH_NAME="${{ github.event.pull_request.head.ref || github.ref_name }}" | |
| BRANCH_NAME="${BRANCH_NAME//\//-}" | |
| PLAYWRIGHT_HTML_REPORT="playwright-report/${{ env.ARTIFACT_PREFIX }}${BRANCH_NAME}" pnpm test | |
| - uses: actions/upload-artifact@v4 | |
| if: always() | |
| with: | |
| name: ui-html-visual-testing-playwright-report | |
| path: ui/html-visual-testing/playwright-report/ | |
| retention-days: 30 |