From 2003480fed2d8f90d3529331eda8fb627f0be34e Mon Sep 17 00:00:00 2001 From: Dan Orlando Date: Tue, 13 Jun 2023 06:20:47 -0700 Subject: [PATCH] Change prepare script to not run in CI mode and remove --ignore-scripts flag from workflow (#491) * Change prepare script to not run in CI mode and remove --ignore-scripts flag from workflow * add release/* to branches for workflows --- .github/workflows/backend-review.yml | 12 +++++++++--- .github/workflows/frontend-review.yml | 10 ++++++++-- package.json | 2 +- 3 files changed, 18 insertions(+), 6 deletions(-) diff --git a/.github/workflows/backend-review.yml b/.github/workflows/backend-review.yml index d85e99fe27..fb6754b9dc 100644 --- a/.github/workflows/backend-review.yml +++ b/.github/workflows/backend-review.yml @@ -2,9 +2,15 @@ name: Backend Unit Tests on: push: - branches: [feat/playwright-jest-cicd] + branches: + - main + - dev + - release/* pull_request: - branches: [ feat/playwright-jest-cicd ] + branches: + - main + - dev + - release/* jobs: tests_Backend: name: Run Backend unit tests @@ -25,7 +31,7 @@ jobs: cache: 'npm' - name: Install dependencies - run: npm ci --ignore-scripts + run: npm ci # - name: Install Linux X64 Sharp # run: npm install --platform=linux --arch=x64 --verbose sharp diff --git a/.github/workflows/frontend-review.yml b/.github/workflows/frontend-review.yml index a4c29531b1..6652d686c3 100644 --- a/.github/workflows/frontend-review.yml +++ b/.github/workflows/frontend-review.yml @@ -2,9 +2,15 @@ name: Frontend Unit Tests on: push: - branches: [main, dev] + branches: + - main + - dev + - release/* pull_request: - branches: [main, dev] + branches: + - main + - dev + - release/* jobs: tests_frontend: name: Run frontend unit tests diff --git a/package.json b/package.json index 266d2a0dd1..0e838d33e6 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,7 @@ "test:api": "cd api && npm run test", "e2e:update": "playwright test --config=e2e/playwright.config.js --update-snapshots", "e2e:report": "npx playwright show-report e2e/playwright-report", - "prepare": "husky install", + "prepare": "test \"$NODE_ENV\" != \"CI\" && husky install", "format": "prettier-eslint --write \"{,!(node_modules)/**/}*.{js,jsx,ts,tsx}\"" }, "repository": {