-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
79 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,79 @@ | ||
version: 2.1 | ||
orbs: | ||
cypress: cypress-io/[email protected] | ||
codecov: codecov/[email protected] | ||
executors: | ||
with-chrome-and-firefox: | ||
docker: | ||
- image: "cypress/browsers:node16.14.2-slim-chrome100-ff99-edge" | ||
resource_class: large | ||
jobs: | ||
chromatic-deployment: | ||
docker: | ||
- image: cimg/node:21.7.3 | ||
working_directory: ~/chromatic | ||
steps: | ||
- checkout | ||
- restore_cache: | ||
keys: | ||
- 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/node:21.7.3-browsers | ||
steps: | ||
- checkout | ||
- restore_cache: | ||
key: pnpm-cache-v2-{{ checksum "pnpm-lock.yaml" }} | ||
- run: | ||
name: Install pnpm package manager | ||
command: | | ||
sudo corepack enable | ||
sudo corepack prepare pnpm@latest-8 --activate | ||
- run: | ||
name: Install Dependencies | ||
command: pnpm install --no-frozen-lockfile | ||
- run: | ||
name: Chrome key start setup | ||
command: sudo apt update -y | ||
- run: | ||
name: Chrome key finish setup | ||
command: wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb | ||
- run: | ||
name: Chrome package download | ||
command: sudo apt install ./google-chrome-stable_current_amd64.deb | ||
- save_cache: | ||
key: pnpm-cache-v2-{{ checksum "pnpm-lock.yaml" }} | ||
paths: | ||
- ~/.pnpm-store | ||
- store_artifacts: | ||
path: /root/.npm/_logs | ||
- run: | ||
name: Run Jest Tests | ||
command: pnpm test | ||
- codecov/upload | ||
parallelism: 6 | ||
workflows: | ||
chromatic-deploy: | ||
jobs: | ||
- build: | ||
name: Build Next.js project | ||
#- cypress/run: | ||
#name: Run Cypress E2E tests with Electron | ||
#cypress-command: npx cypress run --browser electron | ||
#start-command: pnpm run dev | ||
#parallelism: 8 |