diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 989a8314cb9..0a8a82aa5aa 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -38,6 +38,7 @@ jobs: node-version: ${{ matrix.node-version }} cache: 'yarn' - run: yarn + # - run: yarn build:frontend # not needed - run: yarn lint - run: yarn run test env: diff --git a/.github/workflows/build_coverage.yaml b/.github/workflows/build_coverage.yaml index 90d2066ee64..de563526554 100644 --- a/.github/workflows/build_coverage.yaml +++ b/.github/workflows/build_coverage.yaml @@ -39,6 +39,7 @@ jobs: node-version: ${{ matrix.node-version }} cache: 'yarn' - run: yarn + - run: yarn build:frontend - run: yarn run test:coverage env: CI: true diff --git a/.github/workflows/build_prs.yaml b/.github/workflows/build_prs.yaml index 24b108ad938..1a5b641e845 100644 --- a/.github/workflows/build_prs.yaml +++ b/.github/workflows/build_prs.yaml @@ -20,3 +20,4 @@ jobs: - run: yarn install --frozen-lockfile --ignore-scripts - run: yarn lint - run: yarn build + #- run: yarn build:frontend # not needed diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index cf264e3d245..562dbf884ee 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -22,6 +22,7 @@ jobs: cache: 'yarn' - run: | yarn install --frozen-lockfile + yarn --cwd ./frontend install --frozen-lockfile - run: | LATEST=$(npm show unleash-server version) TAG=$(node scripts/npm-tag.js $LATEST) diff --git a/frontend/README.md b/frontend/README.md index a19aa77df32..a951b0e0884 100644 --- a/frontend/README.md +++ b/frontend/README.md @@ -8,7 +8,7 @@ First, start the unleash-api backend on port 4242. Then, start the frontend dev server: ``` -cd ~/frontend +cd ./frontend yarn install yarn run start ``` @@ -18,7 +18,7 @@ yarn run start Alternatively, instead of running unleash-api on localhost, you can use a remote instance: ``` -cd ~/frontend +cd ./frontend yarn install yarn run start:sandbox ``` diff --git a/package.json b/package.json index 14e8f54ff7e..3c00dd43288 100644 --- a/package.json +++ b/package.json @@ -38,13 +38,15 @@ "build:watch": "tsc -w --strictNullChecks false", "prebuild": "yarn run clean", "build": "yarn run copy-templates && tsc --pretty --strictNullChecks false", - "prepare": "node scripts/husky-install && cd frontend && yarn && cd .. && yarn run build", + "build:frontend": "yarn --cwd ./frontend", + "prepare": "node scripts/husky-install && yarn run build", "test": "NODE_ENV=test PORT=4243 jest", "test:unit": "NODE_ENV=test PORT=4243 jest --testPathIgnorePatterns=src/test/e2e --testPathIgnorePatterns=dist", "test:docker": "./scripts/docker-postgres.sh", "test:docker:cleanup": "docker rm -f unleash-postgres", "test:watch": "yarn test --watch", "test:coverage": "NODE_ENV=test PORT=4243 jest --coverage --testLocationInResults --outputFile=\"coverage/report.json\" --forceExit --testTimeout=10000", + "pretest:coverage:jest": "yarn build:frontend", "test:coverage:jest": "NODE_ENV=test PORT=4243 jest --silent --ci --json --coverage --testLocationInResults --outputFile=\"report.json\" --forceExit --testTimeout=10000", "seed:setup": "ts-node src/test/e2e/seed/segment.seed.ts", "seed:serve": "UNLEASH_DATABASE_NAME=unleash_test UNLEASH_DATABASE_SCHEMA=seed yarn run start:dev",