Skip to content

Commit

Permalink
Create config.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
w3bdesign committed Jun 9, 2024
1 parent a567740 commit 5b946ca
Showing 1 changed file with 79 additions and 0 deletions.
79 changes: 79 additions & 0 deletions .circleci/config.yml
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

0 comments on commit 5b946ca

Please sign in to comment.