diff --git a/.github/actions/changes/action.yaml b/.github/actions/changes/action.yaml index 3c8c9eaa80..f697bd15b6 100644 --- a/.github/actions/changes/action.yaml +++ b/.github/actions/changes/action.yaml @@ -25,9 +25,6 @@ outputs: web-studio: description: "'true' if any Studio, common, or SDK package files changed" value: ${{ steps.filter.outputs.web-studio }} - web-scripts: - description: "'true' if any scripts, common, or SDK package files changed" - value: ${{ steps.filter.outputs.web-scripts }} runs: using: "composite" @@ -60,7 +57,3 @@ runs: - 'web/packages/studio/**' - 'web/packages/common/**' - 'web/packages/sdk/**' - web-scripts: - - 'web/packages/scripts/**' - - 'web/packages/common/**' - - 'web/packages/sdk/**' diff --git a/.github/workflows/studio-ci.yaml b/.github/workflows/studio-ci.yaml index 6c63757195..be107a05c7 100644 --- a/.github/workflows/studio-ci.yaml +++ b/.github/workflows/studio-ci.yaml @@ -20,7 +20,6 @@ jobs: runs-on: ubuntu-latest outputs: studio: ${{ steps.changes.outputs.web-studio }} - scripts: ${{ steps.changes.outputs.web-scripts }} steps: - uses: actions/checkout@v6 - uses: ./.github/actions/changes @@ -139,31 +138,6 @@ jobs: - name: Check studio deps run: pnpm deps:studio - web-scripts-check: - name: Web scripts check - needs: changes - if: > - always() && ( - github.event_name == 'workflow_dispatch' || - needs.changes.outputs.scripts == 'true' - ) - runs-on: ubuntu-latest - defaults: - run: - working-directory: web - shell: bash - steps: - - uses: actions/checkout@v6 - - uses: actions/setup-node@v4 - with: - node-version: "22" - - name: Install pnpm via corepack - run: npm i -g corepack@0.31.0 && corepack enable pnpm - - name: Install dependencies - run: pnpm install --frozen-lockfile - - name: Check scripts package - run: pnpm --filter '@nemo/scripts' check:ci - web-studio-e2e: name: Studio UI E2E tests if: github.event_name == 'workflow_dispatch' diff --git a/web/ci/node.yml b/web/ci/node.yml deleted file mode 100644 index 6497e2bfe0..0000000000 --- a/web/ci/node.yml +++ /dev/null @@ -1,8 +0,0 @@ -# Hidden template to DRY package jobs -.pnpm: - image: ${NODE_IMAGE} - before_script: - - cd web - - npm i -g corepack@0.31.0 - - corepack enable - - pnpm install --frozen-lockfile diff --git a/web/ci/packages/common.yml b/web/ci/packages/common.yml deleted file mode 100644 index 3e9c9a1a54..0000000000 --- a/web/ci/packages/common.yml +++ /dev/null @@ -1,9 +0,0 @@ -# Studio Common Package Rules and Jobs - -# Rules for common changes -.rules:common-changes: &rules_common_changes - rules: - - changes: - paths: - - web/packages/common/**/* - - web/packages/sdk/**/* diff --git a/web/ci/packages/scripts.yml b/web/ci/packages/scripts.yml deleted file mode 100644 index 83d93d4349..0000000000 --- a/web/ci/packages/scripts.yml +++ /dev/null @@ -1,23 +0,0 @@ -# Scripts Package Rules and Jobs - -# Rules for scripts changes -.rules:script-changes: &rules_script_changes - rules: - - changes: - paths: - - web/packages/scripts/**/* - - web/packages/common/**/* - - web/packages/sdk/**/* - -################## -### LINTINGS ### -################## - -# SCRIPTS -web:scripts:check: - extends: .pnpm - needs: [] - stage: test - script: - - pnpm --filter ${PKG_NAME_SCRIPTS} check:ci - <<: *rules_script_changes diff --git a/web/ci/packages/studio.yml b/web/ci/packages/studio.yml deleted file mode 100644 index 9906aa397f..0000000000 --- a/web/ci/packages/studio.yml +++ /dev/null @@ -1,95 +0,0 @@ -# Studio Package Rules and Jobs - -# Rules for Studio changes -.rules:studio-changes: &studio_changes - changes: - paths: - - web/packages/studio/**/* - - web/packages/common/**/* - - web/packages/sdk/**/* - -################## -### TESTS ### -################## - -# STUDIO -web:studio:deps: - extends: .pnpm - needs: [] - stage: test - script: - - pnpm deps:studio - rules: - - *studio_changes - -################## -### BUILD ### -################## - -# Build and extract license files for compliance documentation -licenses:extract: - extends: .pnpm - stage: build - script: - # Build UI package to generate LICENSES.txt - - echo "Building nemo-studio-ui to extract licenses..." - - pnpm --filter ${PKG_NAME_UI} build - - # Create a dedicated directory for license artifacts - - mkdir -p licenses-output - - # Copy license files with descriptive names - - cp packages/studio/dist/LICENSES.txt licenses-output/nemo-studio-ui-LICENSES.txt - - # Generate a combined license file - - echo "====================" > licenses-output/LICENSES-COMBINED.txt - - echo "NEMO STUDIO UI" >> licenses-output/LICENSES-COMBINED.txt - - echo "====================" >> licenses-output/LICENSES-COMBINED.txt - - echo "" >> licenses-output/LICENSES-COMBINED.txt - - cat packages/studio/dist/LICENSES.txt >> licenses-output/LICENSES-COMBINED.txt - - # Display summary - - echo "License files extracted successfully!" - - ls -lh licenses-output/ - # artifacts: - # name: 'licenses-${CI_COMMIT_REF_SLUG}-${CI_COMMIT_SHORT_SHA}' - # paths: - # - licenses-output/ - # expire_in: never - # expose_as: 'Third-Party Licenses' - rules: - - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH - when: on_success - - if: $CI_COMMIT_TAG != null - when: on_success - - if: $CI_PIPELINE_SOURCE == "merge_request_event" - when: manual - allow_failure: true - -################## -### E2E ### -################## - -# TODO: Reenable when transition is complete -web:studio:e2e: - extends: .pnpm - stage: e2e - rules: - # Triggered by a schedule created via Build > Pipeline schedules - # - if: '$CI_PIPELINE_SOURCE == "schedule"' - # when: always - # allow_failure: false - # - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH - # when: always - # <<: *studio_changes - # Support manual trigger as well. - - if: $CI_PIPELINE_SOURCE == "merge_request_event" - when: manual - allow_failure: true - <<: *studio_changes - script: - - apt-get update && apt-get install -y gettext-base jq - - pnpm --filter ${PKG_NAME_UI} exec playwright install --with-deps - - CI=1 pnpm --filter ${PKG_NAME_UI} test:e2e - # SLACK_BOT_TOKEN and SLACK_CHANNEL are configured via CI settings - # <<: *slack_notification_e2e diff --git a/web/ci/scripts/fetch-rc-tags.sh b/web/ci/scripts/fetch-rc-tags.sh deleted file mode 100644 index d9661e44d7..0000000000 --- a/web/ci/scripts/fetch-rc-tags.sh +++ /dev/null @@ -1,67 +0,0 @@ -#!/bin/bash -set -euo pipefail - -# Main function that fetches and calculates RC tags -fetch_rc_tags() { - echo "Fetching latest RC tags for ${NGC_CLI_SERVICE}..." - - # Get the release version from branch name (e.g., release/25.01 -> 25.01) - RELEASE_VERSION=$(echo $CI_COMMIT_REF_NAME | sed 's|^release/||') - echo "Release version: ${RELEASE_VERSION}" - - # Fetch all tags from NGC for this image - NGC_IMAGE_PATH="${NGC_REGISTRY}/${NGC_CLI_ORG}/${NGC_CLI_TEAM}/${NGC_CLI_SERVICE}" - echo "Fetching tags from: ${NGC_IMAGE_PATH}" - - # Get all tags matching the release version pattern (e.g., 25.01-rc*) - # NGC returns an array of objects with "tag" field: [{"tag": "...", ...}, ...] - ALL_TAGS=$(ngc registry image list ${NGC_IMAGE_PATH} --format_type json 2>/dev/null | jq -r '.[].tag' || echo "") - echo "All tags: ${ALL_TAGS}" - - if [ -z "$ALL_TAGS" ]; then - echo "No tags found in NGC registry" - # Initialize for first RC - export NEXT_RC="${RELEASE_VERSION}-rc1" - else - # Filter tags matching the release version pattern with RC suffix - # Pattern: YY.MM-rcN (e.g., 25.01-rc0, 25.12-rc15) - RC_TAGS=$(echo "$ALL_TAGS" | grep -E "^${RELEASE_VERSION}-rc[0-9]+$" || true) - - if [ -z "$RC_TAGS" ]; then - echo "No RC tags found for version ${RELEASE_VERSION}" - # Initialize for first RC - export NEXT_RC="${RELEASE_VERSION}-rc1" - else - echo "Found RC tags:" - echo "$RC_TAGS" - - # Sort tags and get the latest one - # Use version sort to handle multi-digit numbers correctly (e.g., rc10 > rc2) - LATEST_RC=$(echo "$RC_TAGS" | sort -V | tail -n1) - - echo "Latest RC tag: ${LATEST_RC}" - - # Extract RC number from latest tag - # Format: YY.MM-rcN (supports multi-digit values) - RC_NUMBER=$(echo $LATEST_RC | sed -E 's/^.*-rc([0-9]+)$/\1/') - - echo "Current RC: ${RC_NUMBER}" - - # Increment RC number (handles double digits correctly) - NEXT_RC_NUMBER=$((RC_NUMBER + 1)) - export NEXT_RC="${RELEASE_VERSION}-rc${NEXT_RC_NUMBER}" - fi - fi - - echo "NEXT_RC=${NEXT_RC}" - echo "RC_TAG=${RELEASE_VERSION}-rc" - - # Write to dotenv file for downstream jobs - echo "NEXT_RC=${NEXT_RC}" >> build.env - echo "RC_TAG=${RELEASE_VERSION}-rc" >> build.env -} - -# Only run if executed directly (not sourced for testing) -if [ "${BASH_SOURCE[0]}" = "${0}" ]; then - fetch_rc_tags -fi diff --git a/web/packages/scripts/package.json b/web/packages/scripts/package.json index fb3d526107..0d1dc1266f 100644 --- a/web/packages/scripts/package.json +++ b/web/packages/scripts/package.json @@ -5,7 +5,6 @@ "type": "module", "scripts": { "check": "pnpm concurrently --group -c 'red,blue' -n 'lint:fix,typecheck' \"pnpm lint:fix\" \"pnpm typecheck\"", - "check:ci": "pnpm typecheck", "format": "prettier --check './**/*.{js,json,jsx,ts,tsx,yaml}'", "format:fix": "prettier --write './**/*.{js,json,jsx,ts,tsx,yaml}'", "lint": "eslint . --max-warnings 0", diff --git a/web/packages/scripts/tsconfig.json b/web/packages/scripts/tsconfig.json index b6f0279a83..8bc5680c70 100644 --- a/web/packages/scripts/tsconfig.json +++ b/web/packages/scripts/tsconfig.json @@ -1,11 +1,20 @@ { - "extends": "../../tsconfig.json", "compilerOptions": { - "outDir": "./dist", - "rootDir": "./src", - "sourceMap": true, + "target": "ESNext", + "module": "ESNext", + "moduleResolution": "bundler", + "skipLibCheck": true, + "resolveJsonModule": true, + "isolatedModules": true, + "noEmit": true, + "strict": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "noFallthroughCasesInSwitch": true, + "forceConsistentCasingInFileNames": true, + "verbatimModuleSyntax": true, "types": ["node", "vite/client"] }, "include": ["src/**/*.ts"], - "exclude": ["node_modules", "dist", "packages/common"] + "exclude": ["node_modules", "dist"] } diff --git a/web/tsconfig.json b/web/tsconfig.json deleted file mode 100644 index 630da81aae..0000000000 --- a/web/tsconfig.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "compilerOptions": { - "target": "ESNext", - "lib": ["DOM", "DOM.Iterable", "ESNext"], - "module": "ESNext", - "skipLibCheck": true, - "moduleResolution": "bundler", - "resolveJsonModule": true, - "isolatedModules": true, - "noEmit": true, - "jsx": "react-jsx", - "strict": true, - "noUnusedLocals": true, - "noUnusedParameters": true, - "noFallthroughCasesInSwitch": true, - "allowJs": true, - "forceConsistentCasingInFileNames": true, - "verbatimModuleSyntax": true, - "types": [], - "paths": { - "@studio/*": ["./packages/studio/src/*"], - "@e2e-tests/*": ["./packages/studio/e2e-tests/*"] - } - }, - "exclude": ["node_modules", "dist", "build"] -}