diff --git a/.github/workflows/pr_checks.yaml b/.github/workflows/pr_checks.yaml index a8e8b9695..cfd153918 100644 --- a/.github/workflows/pr_checks.yaml +++ b/.github/workflows/pr_checks.yaml @@ -31,7 +31,7 @@ jobs: if: steps.root-cache.outputs.cache-hit != 'true' run: npm ci - install-config-packages: + install-config-yaml: needs: install-root runs-on: ubuntu-latest steps: @@ -46,32 +46,20 @@ jobs: path: node_modules key: ${{ runner.os }}-root-node-modules-${{ hashFiles('package-lock.json') }} - - uses: actions/cache@v4 - id: config-types-cache - with: - path: packages/config-types/node_modules - key: ${{ runner.os }}-config-types-node-modules-${{ hashFiles('packages/config-types/package-lock.json') }} - - uses: actions/cache@v4 id: config-yaml-cache with: path: packages/config-yaml/node_modules key: ${{ runner.os }}-config-yaml-node-modules-${{ hashFiles('packages/config-yaml/package-lock.json') }} - - name: Install config-types dependencies - if: steps.config-types-cache.outputs.cache-hit != 'true' - run: | - cd packages/config-types - npm ci - - name: Install config-yaml dependencies if: steps.config-yaml-cache.outputs.cache-hit != 'true' run: | cd packages/config-yaml npm ci - config-packages-checks: - needs: install-config-packages + config-yaml-checks: + needs: install-config-yaml runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -85,25 +73,12 @@ jobs: path: node_modules key: ${{ runner.os }}-root-node-modules-${{ hashFiles('package-lock.json') }} - - uses: actions/cache@v4 - id: config-types-cache - with: - path: packages/config-types/node_modules - key: ${{ runner.os }}-config-types-node-modules-${{ hashFiles('packages/config-types/package-lock.json') }} - - uses: actions/cache@v4 id: config-yaml-cache with: path: packages/config-yaml/node_modules key: ${{ runner.os }}-config-yaml-node-modules-${{ hashFiles('packages/config-yaml/package-lock.json') }} - - name: Build and check config-types - run: | - cd packages/config-types - npx tsc --noEmit - npm run build - ## No tests to run - - name: Build and check config-yaml run: | cd packages/config-yaml @@ -141,7 +116,7 @@ jobs: npm ci core-checks: - needs: [install-core, install-config-packages] + needs: [install-core, install-config-yaml] runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -162,18 +137,17 @@ jobs: path: core/node_modules key: ${{ runner.os }}-core-node-modules-${{ hashFiles('core/package-lock.json') }} - - uses: actions/cache@v4 - id: config-types-cache - with: - path: packages/config-types/node_modules - key: ${{ runner.os }}-config-types-node-modules-${{ hashFiles('packages/config-types/package-lock.json') }} - - uses: actions/cache@v4 id: config-yaml-cache with: path: packages/config-yaml/node_modules key: ${{ runner.os }}-config-yaml-node-modules-${{ hashFiles('packages/config-yaml/package-lock.json') }} + - name: Build config-yaml + run: | + cd packages/config-yaml + npm run build + - name: Type check and lint run: | cd core @@ -183,7 +157,7 @@ jobs: OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} install-gui: - needs: [install-root, install-core, install-config-packages] + needs: [install-root, install-core, install-config-yaml] runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -208,18 +182,17 @@ jobs: path: gui/node_modules key: ${{ runner.os }}-gui-node-modules-${{ hashFiles('gui/package-lock.json') }} - - uses: actions/cache@v4 - id: config-types-cache - with: - path: packages/config-types/node_modules - key: ${{ runner.os }}-config-types-node-modules-${{ hashFiles('packages/config-types/package-lock.json') }} - - uses: actions/cache@v4 id: config-yaml-cache with: path: packages/config-yaml/node_modules key: ${{ runner.os }}-config-yaml-node-modules-${{ hashFiles('packages/config-yaml/package-lock.json') }} + - name: Build config-yaml + run: | + cd packages/config-yaml + npm run build + - name: Install gui dependencies if: steps.gui-cache.outputs.cache-hit != 'true' run: | @@ -252,25 +225,24 @@ jobs: path: gui/node_modules key: ${{ runner.os }}-gui-node-modules-${{ hashFiles('gui/package-lock.json') }} - - uses: actions/cache@v4 - id: config-types-cache - with: - path: packages/config-types/node_modules - key: ${{ runner.os }}-config-types-node-modules-${{ hashFiles('packages/config-types/package-lock.json') }} - - uses: actions/cache@v4 id: config-yaml-cache with: path: packages/config-yaml/node_modules key: ${{ runner.os }}-config-yaml-node-modules-${{ hashFiles('packages/config-yaml/package-lock.json') }} + - name: Build config-yaml + run: | + cd packages/config-yaml + npm run build + - name: Type check run: | cd gui npx tsc --noEmit binary-checks: - needs: [install-root, install-core, install-config-packages] + needs: [install-root, install-core, install-config-yaml] runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -295,18 +267,17 @@ jobs: path: binary/node_modules key: ${{ runner.os }}-binary-node-modules-${{ hashFiles('binary/package-lock.json') }} - - uses: actions/cache@v4 - id: config-types-cache - with: - path: packages/config-types/node_modules - key: ${{ runner.os }}-config-types-node-modules-${{ hashFiles('packages/config-types/package-lock.json') }} - - uses: actions/cache@v4 id: config-yaml-cache with: path: packages/config-yaml/node_modules key: ${{ runner.os }}-config-yaml-node-modules-${{ hashFiles('packages/config-yaml/package-lock.json') }} + - name: Build config-yaml + run: | + cd packages/config-yaml + npm run build + - name: Install binary dependencies if: steps.binary-cache.outputs.cache-hit != 'true' run: | @@ -319,7 +290,7 @@ jobs: npx tsc --noEmit install-vscode: - needs: [install-root, install-core, install-config-packages] + needs: [install-root, install-core, install-config-yaml] runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -344,18 +315,17 @@ jobs: path: extensions/vscode/node_modules key: ${{ runner.os }}-vscode-node-modules-${{ hashFiles('extensions/vscode/package-lock.json') }} - - uses: actions/cache@v4 - id: config-types-cache - with: - path: packages/config-types/node_modules - key: ${{ runner.os }}-config-types-node-modules-${{ hashFiles('packages/config-types/package-lock.json') }} - - uses: actions/cache@v4 id: config-yaml-cache with: path: packages/config-yaml/node_modules key: ${{ runner.os }}-config-yaml-node-modules-${{ hashFiles('packages/config-yaml/package-lock.json') }} + - name: Build config-yaml + run: | + cd packages/config-yaml + npm run build + - name: Install vscode dependencies if: steps.vscode-cache.outputs.cache-hit != 'true' run: | @@ -390,18 +360,17 @@ jobs: path: extensions/vscode/node_modules key: ${{ runner.os }}-vscode-node-modules-${{ hashFiles('extensions/vscode/package-lock.json') }} - - uses: actions/cache@v4 - id: config-types-cache - with: - path: packages/config-types/node_modules - key: ${{ runner.os }}-config-types-node-modules-${{ hashFiles('packages/config-types/package-lock.json') }} - - uses: actions/cache@v4 id: config-yaml-cache with: path: packages/config-yaml/node_modules key: ${{ runner.os }}-config-yaml-node-modules-${{ hashFiles('packages/config-yaml/package-lock.json') }} + - name: Build config-yaml + run: | + cd packages/config-yaml + npm run build + - name: Type check and lint run: | cd extensions/vscode @@ -409,7 +378,7 @@ jobs: npm run lint core-tests: - needs: [install-core, install-config-packages] + needs: [install-core, install-config-yaml] runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -423,18 +392,17 @@ jobs: path: core/node_modules key: ${{ runner.os }}-core-node-modules-${{ hashFiles('core/package-lock.json') }} - - uses: actions/cache@v4 - id: config-types-cache - with: - path: packages/config-types/node_modules - key: ${{ runner.os }}-config-types-node-modules-${{ hashFiles('packages/config-types/package-lock.json') }} - - uses: actions/cache@v4 id: config-yaml-cache with: path: packages/config-yaml/node_modules key: ${{ runner.os }}-config-yaml-node-modules-${{ hashFiles('packages/config-yaml/package-lock.json') }} + - name: Build config-yaml + run: | + cd packages/config-yaml + npm run build + - name: Run core tests run: | cd core @@ -450,7 +418,7 @@ jobs: vscode-get-test-file-matrix: runs-on: ubuntu-latest - needs: [install-root, install-vscode, install-config-packages] + needs: [install-root, install-vscode, install-config-yaml] outputs: test_file_matrix: ${{ steps.vscode-get-test-file-matrix.outputs.test_file_matrix }} steps: @@ -462,18 +430,17 @@ jobs: path: extensions/vscode/node_modules key: ${{ runner.os }}-vscode-node-modules-${{ hashFiles('extensions/vscode/package-lock.json') }} - - uses: actions/cache@v4 - id: config-types-cache - with: - path: packages/config-types/node_modules - key: ${{ runner.os }}-config-types-node-modules-${{ hashFiles('packages/config-types/package-lock.json') }} - - uses: actions/cache@v4 id: config-yaml-cache with: path: packages/config-yaml/node_modules key: ${{ runner.os }}-config-yaml-node-modules-${{ hashFiles('packages/config-yaml/package-lock.json') }} + - name: Build config-yaml + run: | + cd packages/config-yaml + npm run build + - name: Get test files id: vscode-get-test-file-matrix run: | @@ -497,7 +464,7 @@ jobs: vscode-package-extension: runs-on: ubuntu-latest - needs: [install-vscode, install-core, install-config-packages] + needs: [install-vscode, install-core, install-config-yaml] steps: - uses: actions/checkout@v4 @@ -517,18 +484,17 @@ jobs: path: core/node_modules key: ${{ runner.os }}-core-node-modules-${{ hashFiles('core/package-lock.json') }} - - uses: actions/cache@v4 - id: config-types-cache - with: - path: packages/config-types/node_modules - key: ${{ runner.os }}-config-types-node-modules-${{ hashFiles('packages/config-types/package-lock.json') }} - - uses: actions/cache@v4 id: config-yaml-cache with: path: packages/config-yaml/node_modules key: ${{ runner.os }}-config-yaml-node-modules-${{ hashFiles('packages/config-yaml/package-lock.json') }} + - name: Build config-yaml + run: | + cd packages/config-yaml + npm run build + - name: Package extension run: | cd extensions/vscode @@ -542,7 +508,7 @@ jobs: vscode-download-e2e-dependencies: runs-on: ubuntu-latest - needs: [install-vscode, install-core, install-config-packages] + needs: [install-vscode, install-core, install-config-yaml] steps: - uses: actions/checkout@v4 @@ -562,18 +528,17 @@ jobs: path: extensions/vscode/e2e/storage key: ${{ runner.os }}-vscode-storage-${{ hashFiles('extensions/vscode/package-lock.json') }} - - uses: actions/cache@v4 - id: config-types-cache - with: - path: packages/config-types/node_modules - key: ${{ runner.os }}-config-types-node-modules-${{ hashFiles('packages/config-types/package-lock.json') }} - - uses: actions/cache@v4 id: config-yaml-cache with: path: packages/config-yaml/node_modules key: ${{ runner.os }}-config-yaml-node-modules-${{ hashFiles('packages/config-yaml/package-lock.json') }} + - name: Build config-yaml + run: | + cd packages/config-yaml + npm run build + - name: Download Dependencies if: steps.storage-cache.outputs.cache-hit != 'true' run: | @@ -595,7 +560,7 @@ jobs: vscode-package-extension, install-vscode, install-core, - install-config-packages, + install-config-yaml, ] runs-on: ubuntu-latest # Tests requiring secrets need approval from maintainers @@ -636,18 +601,17 @@ jobs: name: vscode-e2e-dependencies path: extensions/vscode/e2e/storage - - uses: actions/cache@v4 - id: config-types-cache - with: - path: packages/config-types/node_modules - key: ${{ runner.os }}-config-types-node-modules-${{ hashFiles('packages/config-types/package-lock.json') }} - - uses: actions/cache@v4 id: config-yaml-cache with: path: packages/config-yaml/node_modules key: ${{ runner.os }}-config-yaml-node-modules-${{ hashFiles('packages/config-yaml/package-lock.json') }} + - name: Build config-yaml + run: | + cd packages/config-yaml + npm run build + - name: Fix VSCode binary permissions run: | chmod +x extensions/vscode/e2e/storage/VSCode-linux-x64/code @@ -690,7 +654,7 @@ jobs: path: extensions/vscode/e2e/storage/screenshots gui-tests: - needs: [install-gui, install-core, install-config-packages] + needs: [install-gui, install-core, install-config-yaml] runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -710,18 +674,17 @@ jobs: path: core/node_modules key: ${{ runner.os }}-core-node-modules-${{ hashFiles('core/package-lock.json') }} - - uses: actions/cache@v4 - id: config-types-cache - with: - path: packages/config-types/node_modules - key: ${{ runner.os }}-config-types-node-modules-${{ hashFiles('packages/config-types/package-lock.json') }} - - uses: actions/cache@v4 id: config-yaml-cache with: path: packages/config-yaml/node_modules key: ${{ runner.os }}-config-yaml-node-modules-${{ hashFiles('packages/config-yaml/package-lock.json') }} + - name: Build config-yaml + run: | + cd packages/config-yaml + npm run build + - name: Install GUI dependencies if: steps.gui-cache.outputs.cache-hit != 'true' run: cd gui && npm ci @@ -734,7 +697,7 @@ jobs: npm test jetbrains-tests: - needs: [install-root, core-checks, install-config-packages] + needs: [install-root, core-checks, install-config-yaml] runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -743,18 +706,17 @@ jobs: path: core/node_modules key: ${{ runner.os }}-core-node-modules-${{ hashFiles('core/package-lock.json') }} - - uses: actions/cache@v4 - id: config-types-cache - with: - path: packages/config-types/node_modules - key: ${{ runner.os }}-config-types-node-modules-${{ hashFiles('packages/config-types/package-lock.json') }} - - uses: actions/cache@v4 id: config-yaml-cache with: path: packages/config-yaml/node_modules key: ${{ runner.os }}-config-yaml-node-modules-${{ hashFiles('packages/config-yaml/package-lock.json') }} + - name: Build config-yaml + run: | + cd packages/config-yaml + npm run build + - name: Setup Java uses: actions/setup-java@v4.5.0 with: @@ -865,8 +827,8 @@ jobs: - vscode-e2e-tests - gui-tests - jetbrains-tests - - config-packages-checks - - install-config-packages + - config-yaml-checks + - install-config-yaml steps: - name: Decide whether the needed jobs succeeded or failed diff --git a/gui/src/components/mainInput/Lump/EditBlockButton.tsx b/gui/src/components/mainInput/Lump/EditBlockButton.tsx index 53cd82cfb..6cdcac4b0 100644 --- a/gui/src/components/mainInput/Lump/EditBlockButton.tsx +++ b/gui/src/components/mainInput/Lump/EditBlockButton.tsx @@ -4,7 +4,10 @@ import { useContext } from "react"; import { useAuth } from "../../../context/Auth"; import { IdeMessengerContext } from "../../../context/IdeMessenger"; -type SectionKey = Exclude; +type SectionKey = Exclude< + keyof ConfigYaml, + "name" | "version" | "schema" | "metadata" +>; interface EditBlockButtonProps { blockType: T;