This repository has been archived by the owner on Nov 4, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1610 from w3bdesign/1608-pnpm
1608 pnpm
- Loading branch information
Showing
5 changed files
with
15,977 additions
and
25,520 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,67 +1,52 @@ | ||
version: 2.1 | ||
orbs: | ||
cypress: cypress-io/[email protected] | ||
codecov: codecov/codecov@4.0.1 | ||
codecov: codecov/codecov@3.3.0 | ||
executors: | ||
with-chrome-and-firefox: | ||
docker: | ||
- image: "cypress/browsers:node-20.10.0-chrome-118.0.5993.88-1-ff-118.0.2-edge-118.0.2088.46-1" | ||
- image: "cypress/browsers:node16.14.2-slim-chrome100-ff99-edge" | ||
resource_class: large | ||
jobs: | ||
cypress-run-with-electron: | ||
executor: with-chrome-and-firefox | ||
steps: | ||
- checkout | ||
- run: npm install | ||
- save_cache: | ||
key: v1-dependenciesx-{{ checksum "package.json" }} | ||
paths: | ||
- node_modules | ||
- run: | ||
name: Start Dev Server | ||
command: npm run dev | ||
background: true | ||
- run: | ||
name: Run Cypress E2E tests with Electron | ||
command: | | ||
npx cypress run --browser electron | ||
chromatic-deployment: | ||
docker: | ||
- image: cimg/node:21.6.2 | ||
- image: cimg/node:21.5.0 | ||
working_directory: ~/chromatic | ||
steps: | ||
- checkout | ||
- restore_cache: | ||
keys: | ||
- v1-dependencies-{{ checksum "package.json" }} | ||
- v1-dependencies-cache | ||
- run: yarn install | ||
- run: yarn chromatic --project-token=${CHROMATIC_PROJECT_TOKEN} | ||
- pnpm-packages-v1-{{ checksum "pnpm-lock.yaml" }} | ||
- pnpm-packages-cache-v1 | ||
- run: | ||
name: Install pnpm package manager | ||
command: | | ||
sudo corepack enable | ||
sudo corepack prepare pnpm@latest-8 --activate | ||
- run: | ||
name: Install Dependencies | ||
command: pnpm install --frozen-lockfile | ||
- run: pnpm run chromatic -- --project-token=${CHROMATIC_PROJECT_TOKEN} | ||
- save_cache: | ||
key: pnpm-packages-v1-{{ checksum "pnpm-lock.yaml" }} | ||
paths: | ||
- ~/.pnpm-store | ||
build: | ||
working_directory: /home/circleci/dfweb | ||
docker: | ||
- image: cimg/base:stable | ||
- image: cimg/node:21.5.0-browsers | ||
steps: | ||
- checkout | ||
- restore_cache: | ||
key: pnpm-cache-v2-{{ checksum "pnpm-lock.yaml" }} | ||
- run: | ||
name: Install NVM and Node.js | ||
command: | | ||
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash | ||
echo 'export NVM_DIR="$HOME/.nvm"' >> $BASH_ENV | ||
echo '[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"' >> $BASH_ENV | ||
source $BASH_ENV | ||
nvm install 18.17.0 | ||
- run: | ||
name: Verify Node.js version | ||
name: Install pnpm package manager | ||
command: | | ||
source $BASH_ENV | ||
node --version | ||
- restore_cache: | ||
key: npm-cache-v2-{{ checksum "package-lock.json" }} | ||
sudo corepack enable | ||
sudo corepack prepare pnpm@latest-8 --activate | ||
- run: | ||
name: Install Dependencies | ||
command: npm ci | ||
command: pnpm install --no-frozen-lockfile | ||
- run: | ||
name: Chrome key start setup | ||
command: sudo apt update -y | ||
|
@@ -72,26 +57,23 @@ jobs: | |
name: Chrome package download | ||
command: sudo apt install ./google-chrome-stable_current_amd64.deb | ||
- save_cache: | ||
key: npm-cache-v1-{{ checksum "package-lock.json" }} | ||
key: pnpm-cache-v2-{{ checksum "pnpm-lock.yaml" }} | ||
paths: | ||
- /home/circleci/.npm | ||
- ~/.pnpm-store | ||
- store_artifacts: | ||
path: /root/.npm/_logs | ||
- run: | ||
name: Run Jest Tests | ||
command: npm test | ||
command: pnpm test | ||
- codecov/upload | ||
parallelism: 6 | ||
workflows: | ||
chromatic-deploy: | ||
jobs: | ||
- build: | ||
name: Build Next.js project | ||
# - chromatic-deployment: | ||
# name: Check build with Chromatic | ||
- cypress-run-with-electron: | ||
name: | ||
Run Cypress E2E tests with Electron | ||
#cypress-command: npx cypress run --browser electron | ||
#start-command: npm run dev | ||
#parallelism: 8 | ||
#- cypress/run: | ||
#name: Run Cypress E2E tests with Electron | ||
#cypress-command: npx cypress run --browser electron | ||
#start-command: pnpm run dev | ||
#parallelism: 8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.