Skip to content

Commit 3bc7358

Browse files
authored
Merge pull request #4231 from LiteFarmOrg/chore/atrevino/LF-4779-chromatic-run-fix
LF-4779 - Repair Chromatic GitHub action workflow
2 parents a2c6bc0 + e5a4723 commit 3bc7358

2 files changed

Lines changed: 16 additions & 11 deletions

File tree

.github/workflows/chromatic.yml

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,22 +8,25 @@ on:
88
jobs:
99
chromatic-deployment:
1010
runs-on: ubuntu-latest
11-
container: node:22.21
1211
defaults:
1312
run:
1413
working-directory: packages/webapp
1514
steps:
1615
- name: Checkout repo
17-
uses: actions/checkout@v4
16+
uses: actions/checkout@v6
1817
with:
1918
fetch-depth: 0
19+
- uses: actions/setup-node@v6
20+
with:
21+
node-version: 22.21
2022
- name: Setup pnpm
21-
uses: pnpm/action-setup@v4
23+
uses: pnpm/action-setup@v6
2224
with:
23-
package_json_file: "packages/webapp/package.json"
25+
package_json_file: packages/webapp/package.json
2426
- name: Install dependencies
25-
run: pnpm install
26-
- name: Publish to Chromatic
27-
env:
28-
NODE_OPTIONS: "--max-old-space-size=8192"
29-
run: ./node_modules/.bin/chromatic --project-token ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
27+
run: pnpm install --frozen-lockfile
28+
- name: Run Chromatic
29+
uses: chromaui/action@98132da0fca2211fb41b3af7b49ce85176007851 # v17.8.0
30+
with:
31+
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
32+
workingDir: packages/webapp

packages/webapp/src/stories/Finances/RevenueForm.stories.jsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ import RevenueForm from '../../components/Forms/RevenueForm';
1717
import { getEntityTypeDefaultValues } from '../../containers/Finances/EntitySaleInputs';
1818
import { componentDecorators } from '../Pages/config/Decorators';
1919

20+
const system = 'metric';
21+
2022
const cropSale = {
2123
sale_id: 17,
2224
customer_name: 'Name',
@@ -207,7 +209,7 @@ CropSaleDetail.args = {
207209
revenueTypeOptions,
208210
onRetire: () => {},
209211
revenueTypes,
210-
entitySaleDefaultValues: getEntityTypeDefaultValues(cropSale, 'crop'),
212+
entitySaleDefaultValues: getEntityTypeDefaultValues(cropSale, 'crop', system),
211213
};
212214

213215
export const AnimalSaleDetail = Template.bind({});
@@ -218,5 +220,5 @@ AnimalSaleDetail.args = {
218220
revenueTypeOptions,
219221
onRetire: () => {},
220222
revenueTypes,
221-
entitySaleDefaultValues: getEntityTypeDefaultValues(animalSale, 'animal'),
223+
entitySaleDefaultValues: getEntityTypeDefaultValues(animalSale, 'animal', system),
222224
};

0 commit comments

Comments
 (0)