The Loki test is working fine in local but in github actions it is failing:
[email protected] loki:test:ci
npx loki –requireReference –reactUri file:./storybook-static
loki test v0.35.0
(node:1921) NOTE: The AWS SDK for JavaScript (v2) will enter maintenance mode
on September 8, 2024 and reach end-of-support on September 8, 2025.
Please migrate your code to use AWS SDK for JavaScript (v3).
For more information, check blog post at https://a.co/cUPnyil
(Usenode --trace-warnings ...
to show where the warning was created)
PASS chrome.app/START
PASS chrome.app/FETCH_STORIES
FAIL chrome.app/chrome.laptop/shared/Button/Primary: Screenshot differs from reference, see .loki/difference/chrome_laptop_shared_Button_Primary.png
FAIL chrome.app/chrome.laptop/shared/Button/Outlined: Screenshot differs from reference, see .loki/difference/chrome_laptop_shared_Button_Outlined.png
FAIL chrome.app/chrome.laptop/shared/Button/Clear: Screenshot differs from reference, see .loki/difference/chrome_laptop_shared_Button_Clear.png
FAIL chrome.app/chrome.laptop/shared/Button/Dark Outline: Screenshot differs from reference, see .loki/difference/chrome_laptop_shared_Button_Dark_Outline.png
FAIL chrome.app/chrome.laptop/shared/Button/Square Size L: No reference image found
FAIL chrome.app/chrome.laptop/shared/Button/Background Inverted: No reference image found
FAIL chrome.app/chrome.laptop/shared/Button/Square: No reference image found
FAIL chrome.app/chrome.laptop/shared/Button/Background Theme: No reference image found
FAIL chrome.app/chrome.laptop/widjets/Navbar/Ligth: Screenshot differs from reference, see .loki/difference/chrome_laptop_widjets_Navbar_Ligth.png
FAIL chrome.app/chrome.laptop/shared/Button/Square Size XL: No reference image found
FAIL chrome.app/chrome.laptop/widjets/Navbar/Dark: Screenshot differs from reference, see .loki/difference/chrome_laptop_widjets_Navbar_Dark.png
FAIL chrome.app/chrome.laptop/widjets/Sidebar/Ligth: Screenshot differs from reference, see .loki/difference/chrome_laptop_widjets_Sidebar_Ligth.png
FAIL chrome.app/chrome.laptop/widjets/Sidebar/Dark: Screenshot differs from reference, see .loki/difference/chrome_laptop_widjets_Sidebar_Dark.png
FAIL chrome.app/chrome.iphone7/shared/Button/Primary: Screenshot differs from reference, see .loki/difference/chrome_iphone7_shared_Button_Primary.png
FAIL chrome.app/chrome.iphone7/shared/Button/Clear: Screenshot differs from reference, see .loki/difference/chrome_iphone7_shared_Button_Clear.png
FAIL chrome.app/chrome.iphone7/shared/Button/Outlined: Screenshot differs from reference, see .loki/difference/chrome_iphone7_shared_Button_Outlined.png
FAIL chrome.app/chrome.iphone7/shared/Button/Dark Outline: Screenshot differs from reference, see .loki/difference/chrome_iphone7_shared_Button_Dark_Outline.png
FAIL chrome.app/chrome.iphone7/shared/Button/Square: No reference image found
FAIL chrome.app/chrome.iphone7/shared/Button/Background Inverted: No reference image found
FAIL chrome.app/chrome.iphone7/shared/Button/Background Theme: No reference image found
FAIL chrome.app/chrome.iphone7/shared/Button/Square Size L: No reference image found
FAIL chrome.app/chrome.iphone7/widjets/Navbar/Dark: Screenshot differs from reference, see .loki/difference/chrome_iphone7_widjets_Navbar_Dark.png
FAIL chrome.app/chrome.iphone7/widjets/Navbar/Ligth: Screenshot differs from reference, see .loki/difference/chrome_iphone7_widjets_Navbar_Ligth.png
FAIL chrome.app/chrome.iphone7/shared/Button/Square Size XL: No reference image found
FAIL chrome.app/chrome.iphone7/widjets/Sidebar/Ligth: Screenshot differs from reference, see .loki/difference/chrome_iphone7_widjets_Sidebar_Ligth.png
FAIL chrome.app/chrome.iphone7/widjets/Sidebar/Dark: Screenshot differs from reference, see .loki/difference/chrome_iphone7_widjets_Sidebar_Dark.png
FAIL chrome.app/TESTS: Some tasks failed to run
FAIL chrome.app: Some tasks failed to run
Visual tests failed
You can update the reference files with:
loki update –reactUri=”file:./storybook-static”
Error: Process completed with exit code 1.
Dependencieses:
{
“name”: “production-project”,
“version”: “1.0.0”,
“description”: “”,
“main”: “index.js”,
“scripts”: {
“test”: “jest –config ./config/jest/jest.config.ts”,
“webpack”: “webpack”,
“start”: “webpack serve –env port=3000”,
“build:prod”: “webpack –env mode=production”,
“build:dev”: “webpack –env mode=development”,
“lint”: “npx eslint “/*.{ts,tsx}””,
“lint:fix”: “npx eslint “/*.{ts,tsx}” –fix”,
“storybook”: “storybook dev -p 6006 -c ./config/storybook”,
“storybook:build”: “storybook build -c ./config/storybook”,
“loki:test”: “npx loki test”,
“loki:test:ok”: “npx loki approve”,
“loki:test:ci”: “npx loki –requireReference –reactUri file:./storybook-static”
},
“keywords”: [],
“author”: “”,
“license”: “ISC”,
“overrides”: {
“loki”: {
“@storybook/react”: “$@storybook/react”
}
},
“devDependencies”: {
“@babel/core”: “^7.17.5”,
“@babel/preset-env”: “^7.16.11”,
“@babel/preset-react”: “^7.16.7”,
“@babel/preset-typescript”: “^7.16.7”,
“@chromatic-com/storybook”: “^1.5.0”,
“@pmmmwh/react-refresh-webpack-plugin”: “^0.5.15”,
“@storybook/addon-essentials”: “^8.1.6”,
“@storybook/addon-interactions”: “^8.1.6”,
“@storybook/addon-links”: “^8.1.6”,
“@storybook/addon-onboarding”: “^8.1.6”,
“@storybook/addon-themes”: “^8.1.7”,
“@storybook/addon-webpack5-compiler-swc”: “^1.0.3”,
“@storybook/blocks”: “^8.1.6”,
“@storybook/react”: “^8.1.6”,
“@storybook/react-webpack5”: “^8.1.7”,
“@storybook/test”: “^8.1.6”,
“@svgr/webpack”: “^6.2.1”,
“@testing-library/jest-dom”: “^5.16.2”,
“@testing-library/react”: “^12.1.3”,
“@types/jest”: “^27.4.1”,
“@types/node”: “^17.0.21”,
“@types/react”: “^17.0.39”,
“@types/react-dom”: “^17.0.11”,
“@types/react-router-dom”: “^5.3.3”,
“@types/scheduler”: “^0.23.0”,
“@types/webpack”: “^5.28.0”,
“@types/webpack-bundle-analyzer”: “^4.7.0”,
“@types/webpack-dev-server”: “^4.7.2”,
“@typescript-eslint/eslint-plugin”: “^5.12.1”,
“@typescript-eslint/parser”: “^5.12.1”,
“babel-loader”: “^8.2.3”,
“babel-plugin-i18next-extract”: “^0.8.3”,
“css-loader”: “^6.6.0”,
“eslint”: “^8.10.0”,
“eslint-config-airbnb”: “^19.0.4”,
“eslint-plugin-import”: “^2.25.4”,
“eslint-plugin-jsx-a11y”: “^6.5.1”,
“eslint-plugin-react”: “^7.29.2”,
“eslint-plugin-react-hooks”: “^4.3.0”,
“eslint-plugin-storybook”: “^0.8.0”,
“file-loader”: “^6.2.0”,
“html-webpack-plugin”: “^5.5.0”,
“identity-obj-proxy”: “^3.0.0”,
“jest”: “^27.5.1”,
“loki”: “^0.35.0”,
“mini-css-extract-plugin”: “^2.5.3”,
“react-refresh”: “^0.14.2”,
“sass”: “^1.49.9”,
“sass-loader”: “^12.6.0”,
“storybook”: “^8.1.6”,
“style-loader”: “^3.3.1”,
“ts-loader”: “^9.2.6”,
“ts-node”: “^10.5.0”,
“typescript”: “^4.5.5”,
“webpack”: “^5.91.0”,
“webpack-bundle-analyzer”: “^4.10.2”,
“webpack-cli”: “^4.10.0”,
“webpack-dev-server”: “^4.7.4”
},
“dependencies”: {
“@newhighsco/storybook-addon-svgr”: “^2.0.17”,
“i18next”: “^21.6.11”,
“i18next-browser-languagedetector”: “^6.1.3”,
“i18next-http-backend”: “^1.3.2”,
“react”: “^17.0.2”,
“react-dom”: “^17.0.2”,
“react-i18next”: “^11.15.5”,
“react-router-dom”: “^6.2.1”
},
“loki”: {
“configurations”: {
“chrome.laptop”: {
“target”: “chrome.app”,
“width”: 1366,
“height”: 768,
“deviceScaleFactor”: 1,
“mobile”: false
},
“chrome.iphone7”: {
“target”: “chrome.app”,
“preset”: “iPhone 7”
}
}
}
}
My yml:
name: learn-github-actions
run-name: ${{ github.actor }} is learning GitHub Actions
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
check-bats-version:
runs-on: ubuntu-latest
steps:
– uses: actions/checkout@v4
– uses: actions/setup-node@v4
with:
node-version: ’20’
– run: npm install -g bats
– run: bats -v
– name: install modules
run: npm install
– name: build production project
if: always()
run: npm run build:prod
– name: linting ts
if: always()
run: npm run lint
– name: unit test
if: always()
run: npm run test
– name: build storybook
if: always()
run: npm run storybook:build
– name: screenshot test
if: always()
run: npm run loki:test:ci
I tryed to push ./storybook.static but that did not help.
Кумар Жекшенбек уулу is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.