From 702e322f901edeb1f3c1ec442f15bdaff093aa14 Mon Sep 17 00:00:00 2001 From: Jonathan Tran Date: Tue, 14 Jan 2025 09:30:08 -0500 Subject: [PATCH] ci: Add yarn test of packages/codemirror-lang-kcl (#5035) * ci: Add yarn test of packages/codemirror-lang-kcl * Fix CI error running tests * Fix postcss config error --- .github/workflows/codemirror-lang-kcl.yml | 32 +++++++++++++++++++ packages/codemirror-lang-kcl/.gitignore | 1 + packages/codemirror-lang-kcl/package.json | 1 + .../codemirror-lang-kcl/postcss.config.js | 1 + packages/codemirror-lang-kcl/yarn.lock | 21 +++++++++++- 5 files changed, 55 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/codemirror-lang-kcl.yml create mode 100644 packages/codemirror-lang-kcl/postcss.config.js diff --git a/.github/workflows/codemirror-lang-kcl.yml b/.github/workflows/codemirror-lang-kcl.yml new file mode 100644 index 000000000..ba9b25be7 --- /dev/null +++ b/.github/workflows/codemirror-lang-kcl.yml @@ -0,0 +1,32 @@ +name: CodeMirror Lang KCL + +on: + pull_request: + push: + branches: + - main + +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + +jobs: + yarn-unit-test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-node@v4 + with: + node-version-file: '.nvmrc' + cache: 'yarn' + + - run: yarn install + working-directory: packages/codemirror-lang-kcl + + - run: yarn tsc + working-directory: packages/codemirror-lang-kcl + + - name: run unit tests + run: yarn test + working-directory: packages/codemirror-lang-kcl diff --git a/packages/codemirror-lang-kcl/.gitignore b/packages/codemirror-lang-kcl/.gitignore index c3a9c7928..5cf263128 100644 --- a/packages/codemirror-lang-kcl/.gitignore +++ b/packages/codemirror-lang-kcl/.gitignore @@ -4,4 +4,5 @@ dist tsconfig.tsbuildinfo *.d.ts *.js +!postcss.config.js !rollup.config.js diff --git a/packages/codemirror-lang-kcl/package.json b/packages/codemirror-lang-kcl/package.json index 785e3e98e..e44f0511c 100644 --- a/packages/codemirror-lang-kcl/package.json +++ b/packages/codemirror-lang-kcl/package.json @@ -28,6 +28,7 @@ "@rollup/plugin-typescript": "^12.1.2", "rollup": "^4.29.1", "rollup-plugin-dts": "^6.1.1", + "vite-tsconfig-paths": "^4.3.2", "vitest": "^2.1.8" }, "files": [ diff --git a/packages/codemirror-lang-kcl/postcss.config.js b/packages/codemirror-lang-kcl/postcss.config.js new file mode 100644 index 000000000..89049fa8a --- /dev/null +++ b/packages/codemirror-lang-kcl/postcss.config.js @@ -0,0 +1 @@ +// This is here to prevent using the one in the root of the project. diff --git a/packages/codemirror-lang-kcl/yarn.lock b/packages/codemirror-lang-kcl/yarn.lock index 66e048b88..6a4fe8b18 100644 --- a/packages/codemirror-lang-kcl/yarn.lock +++ b/packages/codemirror-lang-kcl/yarn.lock @@ -398,7 +398,7 @@ check-error@^2.1.1: resolved "https://registry.yarnpkg.com/check-error/-/check-error-2.1.1.tgz#87eb876ae71ee388fa0471fe423f494be1d96ccc" integrity sha512-OAlb+T7V4Op9OwdkjmguYRqncdlx5JiofwOAUkmTF+jNdHwzTaTs4sRAGpzLF3oOz5xAyDGrPgeIDFQmDOTiJw== -debug@^4.3.7: +debug@^4.1.1, debug@^4.3.7: version "4.4.0" resolved "https://registry.yarnpkg.com/debug/-/debug-4.4.0.tgz#2b3f2aea2ffeb776477460267377dc8710faba8a" integrity sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA== @@ -471,6 +471,11 @@ function-bind@^1.1.2: resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.2.tgz#2c02d864d97f3ea6c8830c464cbd11ab6eab7a1c" integrity sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA== +globrex@^0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/globrex/-/globrex-0.1.2.tgz#dd5d9ec826232730cd6793a5e33a9302985e6098" + integrity sha512-uHJgbwAMwNFf5mLst7IWLNg14x1CkeqglJb/K3doi4dw6q2IvAAmM/Y81kevy83wP+Sst+nutFTYOGg3d1lsxg== + hasown@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/hasown/-/hasown-2.0.2.tgz#003eaf91be7adc372e84ec59dc37252cedb80003" @@ -647,6 +652,11 @@ tinyspy@^3.0.2: resolved "https://registry.yarnpkg.com/tinyspy/-/tinyspy-3.0.2.tgz#86dd3cf3d737b15adcf17d7887c84a75201df20a" integrity sha512-n1cw8k1k0x4pgA2+9XrOkFydTerNcJ1zWCO5Nn9scWHTD+5tp8dghT2x1uduQePZTZgd3Tupf+x9BxJjeJi77Q== +tsconfck@^3.0.3: + version "3.1.4" + resolved "https://registry.yarnpkg.com/tsconfck/-/tsconfck-3.1.4.tgz#de01a15334962e2feb526824339b51be26712229" + integrity sha512-kdqWFGVJqe+KGYvlSO9NIaWn9jT1Ny4oKVzAJsKii5eoE9snzTJzL4+MMVOMn+fikWGFmKEylcXL710V/kIPJQ== + typescript@^5.7.2: version "5.7.2" resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.7.2.tgz#3169cf8c4c8a828cde53ba9ecb3d2b1d5dd67be6" @@ -663,6 +673,15 @@ vite-node@2.1.8: pathe "^1.1.2" vite "^5.0.0" +vite-tsconfig-paths@^4.3.2: + version "4.3.2" + resolved "https://registry.yarnpkg.com/vite-tsconfig-paths/-/vite-tsconfig-paths-4.3.2.tgz#321f02e4b736a90ff62f9086467faf4e2da857a9" + integrity sha512-0Vd/a6po6Q+86rPlntHye7F31zA2URZMbH8M3saAZ/xR9QoGN/L21bxEGfXdWmFdNkqPpRdxFT7nmNe12e9/uA== + dependencies: + debug "^4.1.1" + globrex "^0.1.2" + tsconfck "^3.0.3" + vite@^5.0.0: version "5.4.11" resolved "https://registry.yarnpkg.com/vite/-/vite-5.4.11.tgz#3b415cd4aed781a356c1de5a9ebafb837715f6e5"