From fdc0205be00f780d531865bd14630ecc578e3449 Mon Sep 17 00:00:00 2001 From: Khuda Dad Nomani Date: Tue, 20 Jun 2023 12:43:14 +0100 Subject: [PATCH] initial commit --- .github/workflows/if-nodejs-release.yml | 18 +++++++++++------- apps/studio/package.json | 3 +-- package-lock.json | 3 +-- package.json | 1 + 4 files changed, 14 insertions(+), 11 deletions(-) diff --git a/.github/workflows/if-nodejs-release.yml b/.github/workflows/if-nodejs-release.yml index a299c8b77..88912ce4e 100644 --- a/.github/workflows/if-nodejs-release.yml +++ b/.github/workflows/if-nodejs-release.yml @@ -38,16 +38,16 @@ jobs: git config --global core.autocrlf false git config --global core.eol lf - name: Checkout repository - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Check if Node.js project and has package.json id: packagejson - run: test -e ./package.json && echo "::set-output name=exists::true" || echo "::set-output name=exists::false" + run: test -e ./package.json && echo "exists=true" >> $GITHUB_OUTPUT || echo "exists=false" >> $GITHUB_OUTPUT shell: bash - if: steps.packagejson.outputs.exists == 'true' name: Setup Node.js - uses: actions/setup-node@v2 + uses: actions/setup-node@v3 with: - node-version: 14 + node-version: 18 cache: 'npm' cache-dependency-path: '**/package-lock.json' - if: steps.packagejson.outputs.exists == 'true' @@ -55,7 +55,7 @@ jobs: run: npm install - if: steps.packagejson.outputs.exists == 'true' name: Run test - run: npm test + run: npm test --if-present - if: failure() # Only, on failure, send a message on the 94_bot-failing-ci slack channel name: Report workflow run status to Slack uses: 8398a7/action-slack@v3 @@ -68,7 +68,7 @@ jobs: release: needs: [test-nodejs] - name: Publish to any of NPM, Github, and Docker Hub + name: Publish to any of NPM, Github, or Docker Hub runs-on: ubuntu-latest steps: - name: Set git to use LF #to once and for all finish neverending fight between Unix and Windows @@ -77,14 +77,18 @@ jobs: git config --global core.eol lf - name: Checkout repository uses: actions/checkout@v3 + with: + token: ${{ secrets.GH_TOKEN }} - name: Check if Node.js project and has package.json id: packagejson - run: test -e ./package.json && echo "::set-output name=exists::true" || echo "::set-output name=exists::false" + run: test -e ./package.json && echo "exists=true" >> $GITHUB_OUTPUT || echo "exists=false" >> $GITHUB_OUTPUT - if: steps.packagejson.outputs.exists == 'true' name: Setup Node.js uses: actions/setup-node@v3 with: node-version: 18 + cache: 'npm' + cache-dependency-path: '**/package-lock.json' - if: steps.packagejson.outputs.exists == 'true' name: Install dependencies run: npm install diff --git a/apps/studio/package.json b/apps/studio/package.json index 43176ae18..cae5172cf 100644 --- a/apps/studio/package.json +++ b/apps/studio/package.json @@ -54,7 +54,7 @@ "start": "craco start", "build": "npm run generate:template-parameters && craco build", "test": "npm run test:unit", - "test:unit": "craco test --detectOpenHandles", + "test:unit": "craco test --watchAll=false --detectOpenHandles", "eject": "react-scripts eject", "lint": "eslint --max-warnings 0 --config .eslintrc .", "lint:fix": "eslint --max-warnings 0 --config .eslintrc . --fix", @@ -90,7 +90,6 @@ "@asyncapi/nodejs-ws-template": "^0.9.33", "@asyncapi/python-paho-template": "^0.2.13", "@asyncapi/ts-nats-template": "^0.10.2", - "@craco/craco": "^7.1.0", "@tailwindcss/typography": "^0.5.8", "@testing-library/jest-dom": "^5.16.5", "@testing-library/react": "^13.4.0", diff --git a/package-lock.json b/package-lock.json index eca43cca9..689fb9944 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,6 +9,7 @@ "packages/*" ], "devDependencies": { + "@craco/craco": "^7.1.0", "@semantic-release-plus/docker": "^3.1.2", "@semantic-release/commit-analyzer": "^9.0.2", "@semantic-release/github": "^8.0.6", @@ -151,7 +152,6 @@ "@asyncapi/nodejs-ws-template": "^0.9.33", "@asyncapi/python-paho-template": "^0.2.13", "@asyncapi/ts-nats-template": "^0.10.2", - "@craco/craco": "^7.1.0", "@tailwindcss/typography": "^0.5.8", "@testing-library/jest-dom": "^5.16.5", "@testing-library/react": "^13.4.0", @@ -37068,7 +37068,6 @@ "@asyncapi/react-component": "^1.0.0-next.47", "@asyncapi/specs": "^4.2.1", "@asyncapi/ts-nats-template": "^0.10.2", - "@craco/craco": "^7.1.0", "@ebay/nice-modal-react": "^1.2.10", "@headlessui/react": "^1.7.4", "@hookstate/core": "^4.0.0-rc21", diff --git a/package.json b/package.json index c0461a20b..bb0ac8305 100644 --- a/package.json +++ b/package.json @@ -13,6 +13,7 @@ }, "devDependencies": { "turbo": "^1.10.2", + "@craco/craco": "^7.1.0", "semantic-release": "^21.0.3", "semantic-release-monorepo": "^7.0.5", "@semantic-release-plus/docker": "^3.1.2",