Skip to content

Commit

Permalink
Merge pull request #98 from junkboy0315/reset-yarn-lock
Browse files Browse the repository at this point in the history
reset lockfile and move to pnpm
  • Loading branch information
tam315 authored Dec 1, 2022
2 parents 1d8b23b + 154d2e5 commit 70e78c6
Show file tree
Hide file tree
Showing 5 changed files with 13,171 additions and 13,318 deletions.
20 changes: 14 additions & 6 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
uses: actions/cache@v3
with:
path: node_modules
key: ${{ runner.OS }}-build-${{ hashFiles('**/yarn.lock') }}
key: ${{ runner.OS }}-build-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.OS }}-build-${{ env.cache-name }}-
${{ runner.OS }}-build-
Expand All @@ -24,10 +24,14 @@ jobs:
with:
node-version: '16.x'

- uses: pnpm/action-setup@v2
with:
version: 7

- name: npm install, build, and test
run: |
yarn
yarn test
pnpm install
pnpm test
visual-regression-test:
runs-on: ubuntu-latest
Expand All @@ -39,7 +43,7 @@ jobs:
uses: actions/cache@v3
with:
path: node_modules
key: ${{ runner.OS }}-build-${{ hashFiles('**/yarn.lock') }}
key: ${{ runner.OS }}-build-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.OS }}-build-${{ env.cache-name }}-
${{ runner.OS }}-build-
Expand All @@ -50,10 +54,14 @@ jobs:
with:
node-version: '16.x'

- uses: pnpm/action-setup@v2
with:
version: 7

- name: visual regression test
run: |
yarn
yarn loki:test
pnpm install
pnpm loki:test
- name: Save loki result if it failed
uses: actions/upload-artifact@v3
Expand Down
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
"main": "dist/bundle.js",
"types": "dist/ReactCompareImage.d.ts",
"scripts": {
"build": "del-cli dist/**/* && webpack --config ./webpack.production.config.js && yarn tsc",
"prepublishOnly": "yarn test && yarn loki:test && yarn build",
"build": "del-cli dist/**/* && webpack --config ./webpack.production.config.js && pnpm tsc",
"prepublishOnly": "pnpm test && pnpm loki:test && pnpm build",
"test": "jest",
"test:watch": "jest --watch",
"storybook": "start-storybook -p 6006 -s ./public",
"build-storybook": "build-storybook",
"loki:approve": "yarn loki approve",
"loki:test": "build-storybook && yarn loki --chromeDockerImage yukinying/chrome-headless-browser-stable:107.0.5304.121 --chromeFlags=\"--headless --disable-gpu --hide-scrollbars --disable-web-security\" --reactUri file:./storybook-static --requireReference test --chromeTolerance 1",
"loki:update-references": "build-storybook && yarn loki --chromeDockerImage yukinying/chrome-headless-browser-stable:107.0.5304.121 --chromeFlags=\"--headless --disable-gpu --hide-scrollbars --disable-web-security\" --reactUri file:./storybook-static update"
"loki:approve": "pnpm loki approve",
"loki:test": "build-storybook && pnpm loki --chromeDockerImage yukinying/chrome-headless-browser-stable:107.0.5304.121 --chromeFlags=\"--headless --disable-gpu --hide-scrollbars --disable-web-security\" --reactUri file:./storybook-static --requireReference test --chromeTolerance 1",
"loki:update-references": "build-storybook && pnpm loki --chromeDockerImage yukinying/chrome-headless-browser-stable:107.0.5304.121 --chromeFlags=\"--headless --disable-gpu --hide-scrollbars --disable-web-security\" --reactUri file:./storybook-static update"
},
"repository": {
"type": "git",
Expand Down
Loading

1 comment on commit 70e78c6

@vercel
Copy link

@vercel vercel bot commented on 70e78c6 Dec 1, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.