Skip to content
This repository has been archived by the owner on Nov 4, 2024. It is now read-only.

1608 pnpm #1610

Merged
merged 47 commits into from
Mar 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
2e99e04
Delete package-lock.json
w3bdesign Jan 9, 2024
74b32e4
Create pnpm-lock.yaml
w3bdesign Jan 9, 2024
ccab29b
Update next.config.mjs
w3bdesign Jan 9, 2024
16bfe06
Update next.config.mjs
w3bdesign Jan 9, 2024
1e82bad
Update config.yml
w3bdesign Jan 9, 2024
b28a171
Update playwright.yml
w3bdesign Jan 9, 2024
05391c9
Revert "Update playwright.yml"
w3bdesign Jan 9, 2024
ba1f26a
Update playwright.yml
w3bdesign Jan 9, 2024
b515899
Update playwright.yml
w3bdesign Jan 9, 2024
995a6d2
- uses: pnpm/action-setup@v2
w3bdesign Jan 9, 2024
fc96e73
Update playwright.yml
w3bdesign Jan 9, 2024
9be7187
Update config.yml
w3bdesign Jan 9, 2024
f1eabce
Update config.yml
w3bdesign Jan 9, 2024
abaafd2
Update config.yml
w3bdesign Jan 9, 2024
076e5b0
Update config.yml
w3bdesign Jan 9, 2024
488f88a
Update Layout.test.tsx
w3bdesign Jan 9, 2024
f649b56
Update config.yml
w3bdesign Jan 9, 2024
eca9978
Update config.yml
w3bdesign Jan 9, 2024
ee0b885
Update config.yml
w3bdesign Jan 9, 2024
920bda9
Update config.yml
w3bdesign Jan 9, 2024
292b32b
Merge branch 'master' into 1608-pnpm
w3bdesign Jan 9, 2024
de7005d
Merge branch 'master' into 1608-pnpm
w3bdesign Jan 13, 2024
2258496
Merge branch 'master' into 1608-pnpm
w3bdesign Jan 16, 2024
3d57c6b
Merge branch 'master' into 1608-pnpm
w3bdesign Jan 16, 2024
0a903a3
Merge branch 'master' into 1608-pnpm
w3bdesign Jan 16, 2024
474ef73
Merge branch 'master' into 1608-pnpm
w3bdesign Jan 18, 2024
b260bd5
Merge branch 'master' into 1608-pnpm
w3bdesign Jan 18, 2024
cdb3cdd
Merge branch 'master' into 1608-pnpm
w3bdesign Jan 20, 2024
e50119d
Merge branch 'master' into 1608-pnpm
w3bdesign Jan 20, 2024
b8efc9b
Merge branch 'master' into 1608-pnpm
w3bdesign Jan 23, 2024
c474132
Merge branch 'master' into 1608-pnpm
w3bdesign Jan 23, 2024
e23d4e2
Merge branch 'master' into 1608-pnpm
w3bdesign Jan 24, 2024
b8443e5
Merge branch 'master' into 1608-pnpm
w3bdesign Jan 30, 2024
23e9fd8
Merge branch 'master' into 1608-pnpm
w3bdesign Jan 31, 2024
2c2750b
Merge branch 'master' into 1608-pnpm
w3bdesign Feb 14, 2024
91c3e60
Merge branch 'master' into 1608-pnpm
w3bdesign Feb 16, 2024
0fa7c2d
Merge branch 'master' into 1608-pnpm
w3bdesign Mar 6, 2024
f1684b9
Merge branch 'master' into 1608-pnpm
w3bdesign Mar 6, 2024
96486c7
Merge branch 'master' into 1608-pnpm
w3bdesign Mar 6, 2024
ea93007
Merge branch 'master' into 1608-pnpm
w3bdesign Mar 6, 2024
a68e3aa
Update config.yml
w3bdesign Mar 6, 2024
00a86f1
Update config.yml
w3bdesign Mar 6, 2024
dd8bbb1
Merge branch 'master' into 1608-pnpm
w3bdesign Mar 6, 2024
c0cc1a6
Update config.yml
w3bdesign Mar 6, 2024
07e787c
Delete pnpm-lock.yaml
w3bdesign Mar 6, 2024
7e9f4ac
Update config.yml
w3bdesign Mar 6, 2024
83aa5e7
Create pnpm-lock.yaml
w3bdesign Mar 6, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
84 changes: 33 additions & 51 deletions .circleci/config.yml
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
Expand All @@ -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
15 changes: 11 additions & 4 deletions .github/workflows/playwright.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,23 @@ jobs:
timeout-minutes: 60
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- uses: actions/setup-node@v4
- uses: pnpm/action-setup@v2
with:
node-version: 18
cache: 'pnpm' # This will enable caching for pnpm
version: 8
- name: Install pnpm
run: npm install -g pnpm
- name: Verify pnpm installation
run: pnpm --version
- name: Install dependencies
run: npm ci
run: npx pnpm install --frozen-lockfile
- name: Install Playwright Browsers
run: npx playwright install --with-deps
run: npx pnpm exec playwright install --with-deps
- name: Run Playwright tests
run: npx playwright test
run: npx pnpm exec playwright test
- uses: actions/upload-artifact@v4
if: always()
with:
Expand Down
6 changes: 3 additions & 3 deletions next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -37,18 +37,18 @@ const headers = [
}
];

const config = {
const config = {
reactStrictMode: true,
poweredByHeader: false,
images: {
domains: ["cdn.sanity.io", "dfweb.no", "www.dfweb.no"],
minimumCacheTTL: 600
minimumCacheTTL: 800
},
i18n: {
locales: ["nb-NO"],
defaultLocale: "nb-NO"
},
async headers() {
headers() {
return [
{
source: "/(.*)",
Expand Down
Loading
Loading