From b3c8482e8de961490c8911a221aa457010521db3 Mon Sep 17 00:00:00 2001 From: Farrah Mae Ochoa Date: Thu, 25 Apr 2024 18:25:07 +0400 Subject: [PATCH 1/3] ci: test --- .github/workflows/build-and-deploy-staging.yml | 5 +---- .github/workflows/build-and-deploy-test.yml | 5 +---- package.json | 2 +- src/components/Modals/ShareAdsModal/ShareAdsModal.tsx | 4 ++-- 4 files changed, 5 insertions(+), 11 deletions(-) diff --git a/.github/workflows/build-and-deploy-staging.yml b/.github/workflows/build-and-deploy-staging.yml index d06c6529..565d4818 100644 --- a/.github/workflows/build-and-deploy-staging.yml +++ b/.github/workflows/build-and-deploy-staging.yml @@ -40,10 +40,7 @@ jobs: run: npm run build - name: Run tests for Eslint - run: npm run test:eslint - - - name: Run unit tests and coverage report - run: npm run test + run: npm run test:lint - name: Publish to Cloudflare Pages id: publish-to-pages diff --git a/.github/workflows/build-and-deploy-test.yml b/.github/workflows/build-and-deploy-test.yml index 767d6d70..77715a60 100644 --- a/.github/workflows/build-and-deploy-test.yml +++ b/.github/workflows/build-and-deploy-test.yml @@ -60,10 +60,7 @@ jobs: run: npm run build - name: Run tests for Eslint - run: npm run test:eslint - - - name: Run unit tests and coverage report - run: npm run test + run: npm run test:lint - name: Retrieve PR information env: diff --git a/package.json b/package.json index a0d987a1..2fff4c78 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "type": "module", "scripts": { "dev": "vite", - "build": "tsc && vite build", + "build": "vite build", "fix": "eslint \"./src/**/*.?(js|jsx|ts|tsx)\" --fix", "preview": "vite preview", "test:lint": "prettier --log-level silent --write . && eslint \"./src/**/*.?(js|jsx|ts|tsx)\"", diff --git a/src/components/Modals/ShareAdsModal/ShareAdsModal.tsx b/src/components/Modals/ShareAdsModal/ShareAdsModal.tsx index 13195360..98953321 100644 --- a/src/components/Modals/ShareAdsModal/ShareAdsModal.tsx +++ b/src/components/Modals/ShareAdsModal/ShareAdsModal.tsx @@ -1,4 +1,4 @@ -import { memo, MouseEvent, useEffect, useRef } from 'react'; +import { MouseEvent, useEffect, useRef } from 'react'; import html2canvas from 'html2canvas'; import { Clipboard } from '@/components'; import { ADVERTISER_URL, BUY_SELL, RATE_TYPE } from '@/constants'; @@ -160,4 +160,4 @@ const ShareAdsModal = ({ id, isModalOpen, onRequestClose }: TShareAdsModalProps) ); }; -export default memo(ShareAdsModal); +export default ShareAdsModal; From af0703f6f16b12a3c71e3c57e3b21bdce5ce6bfb Mon Sep 17 00:00:00 2001 From: Farrah Mae Ochoa Date: Thu, 25 Apr 2024 18:40:03 +0400 Subject: [PATCH 2/3] ci: test --- .github/workflows/build-and-deploy-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-and-deploy-test.yml b/.github/workflows/build-and-deploy-test.yml index 77715a60..df640a4e 100644 --- a/.github/workflows/build-and-deploy-test.yml +++ b/.github/workflows/build-and-deploy-test.yml @@ -37,7 +37,7 @@ jobs: with: header: Cloudflare Pages Preview Comment number: ${{github.event.pull_request.user.login}} - message: ${{steps.generate_action_url.outputs.comment}} + message: echo "test" recreate: true - name: Create npmrc file From f1dda4167c2f4071f1b00836848295d42bfc1842 Mon Sep 17 00:00:00 2001 From: Farrah Mae Ochoa Date: Thu, 25 Apr 2024 18:44:56 +0400 Subject: [PATCH 3/3] ci: test --- .github/workflows/build-and-deploy-test.yml | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/.github/workflows/build-and-deploy-test.yml b/.github/workflows/build-and-deploy-test.yml index df640a4e..0b2d3102 100644 --- a/.github/workflows/build-and-deploy-test.yml +++ b/.github/workflows/build-and-deploy-test.yml @@ -29,17 +29,9 @@ jobs: - name: Setup node uses: actions/setup-node@v3 with: - node-version: 18.x + node-version: 20.x cache: 'npm' - - name: Post Cloudflare Pages Preview comment - uses: marocchino/sticky-pull-request-comment@331f8f5b4215f0445d3c07b4967662a32a2d3e31 - with: - header: Cloudflare Pages Preview Comment - number: ${{github.event.pull_request.user.login}} - message: echo "test" - recreate: true - - name: Create npmrc file shell: bash run: echo "@deriv-com:registry=https://npm.pkg.github.com" >> .npmrc